mirror of
https://github.com/libretro/Mesen.git
synced 2024-11-24 17:49:40 +00:00
PGO/Test fixes
This commit is contained in:
parent
8f4f67baee
commit
e2528b004b
@ -49,6 +49,7 @@ int main(int argc, char* argv[])
|
||||
vector<char*> testRoms{
|
||||
"..\\..\\Games\\Super Dodge Ball (USA).nes",
|
||||
"..\\..\\Games\\Super Mario Bros. (USA).nes",
|
||||
"..\\..\\Games\\Mega Man (USA).nes",
|
||||
"..\\..\\Games\\Mega Man 2 (USA).nes",
|
||||
"..\\..\\Games\\Mega Man 3 (USA).nes",
|
||||
"..\\..\\Games\\Mega Man 4 (USA).nes",
|
||||
@ -65,8 +66,8 @@ int main(int argc, char* argv[])
|
||||
"..\\..\\Games\\Dragon Warrior IV (USA).nes"
|
||||
};
|
||||
|
||||
SetFlags(0x8000000000000000); //EmulationFlags::ConsoleMode
|
||||
InitializeEmu("C:\\Windows\\Temp\\Mesen", nullptr, nullptr, false, false, false);
|
||||
SetFlags(0x8000000000000000 | 0x20); //EmulationFlags::ConsoleMode | UseHdPacks
|
||||
InitializeEmu("C:\\Code\\PGOMesen", nullptr, nullptr, false, false, false);
|
||||
LoadROM(testRoms[0], "");
|
||||
std::cout << "Running: " << testRoms[0] << std::endl;
|
||||
|
||||
|
@ -75,8 +75,13 @@ void RunEmu()
|
||||
|
||||
void __stdcall OnNotificationReceived(ConsoleNotificationType type)
|
||||
{
|
||||
static int count = 0;
|
||||
if(type == ConsoleNotificationType::GameLoaded) {
|
||||
runThread = new std::thread(RunEmu);
|
||||
count++;
|
||||
if(count % 2 == 0) {
|
||||
//GameLoaded is fired twice because of how the test roms are coded, we want to start running the test on the 2nd time only
|
||||
runThread = new std::thread(RunEmu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -171,7 +176,7 @@ int main(int argc, char* argv[])
|
||||
testIndex = 0;
|
||||
timer.Reset();
|
||||
|
||||
int numberOfThreads = 4;
|
||||
int numberOfThreads = 16;
|
||||
for(int i = 0; i < numberOfThreads; i++) {
|
||||
std::thread *testThread = new std::thread(RunTest);
|
||||
testThreads.push_back(testThread);
|
||||
|
@ -48,7 +48,9 @@ bool ZipReader::ExtractFile(string filename, vector<uint8_t> &output)
|
||||
size_t uncompSize;
|
||||
void *p = mz_zip_reader_extract_file_to_heap(&_zipArchive, filename.c_str(), &uncompSize, 0);
|
||||
if(!p) {
|
||||
#ifdef _DEBUG
|
||||
std::cout << "mz_zip_reader_extract_file_to_heap() failed!" << std::endl;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user