Perf: Fix race condition if a game crashes immediately on start

This commit is contained in:
Jeffrey Pfau 2015-05-10 08:22:03 -07:00
parent a92d02c756
commit efa7f97012
2 changed files with 8 additions and 0 deletions

View File

@ -35,6 +35,7 @@ Bugfixes:
- SDL: Fix potential build issues when Qt and SDL2 are in use
- GBA Memory: Fix jumping to invalid memory when switching from Thumb to ARM
- GBA Video: Fix second frame mode 5
- Perf: Fix race condition if a game crashes immediately on start
Misc:
- Qt: Show multiplayer numbers in window title
- Qt: Solar sensor can have shortcuts set

View File

@ -95,7 +95,14 @@ int main(int argc, char** argv) {
if (!didStart) {
goto cleanup;
}
GBAThreadInterrupt(&context);
if (GBAThreadHasCrashed(&context)) {
GBAThreadJoin(&context);
goto cleanup;
}
GBAGetGameCode(context.gba, gameCode);
GBAThreadContinue(&context);
int frames = perfOpts.frames;
if (!frames) {