Perf: Fix race condition if a game crashes immediately on start
Jeffrey Pfau jeffrey@endrift.com
Sun, 10 May 2015 08:22:03 -0700
2 files changed,
8 insertions(+),
0 deletions(-)
M
CHANGES
→
CHANGES
@@ -54,6 +54,7 @@ - ARM7: Fix ARM multiply instructions when PC is a destination register
- 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: Handle saving input settings better
M
src/platform/perf-main.c
→
src/platform/perf-main.c
@@ -96,7 +96,14 @@
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) {