all repos — mgba @ 73d2c8fda8b7d324ab2b338b17bd10d36651f0f4

mGBA Game Boy Advance Emulator

Perf: Fix race condition if a game crashes immediately on start
Jeffrey Pfau jeffrey@endrift.com
Sun, 10 May 2015 08:22:03 -0700
commit

73d2c8fda8b7d324ab2b338b17bd10d36651f0f4

parent

6f24064f4f6ee35d7926a5dd347dc545e88dd5bf

2 files changed, 8 insertions(+), 0 deletions(-)

jump to
M CHANGESCHANGES

@@ -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.csrc/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) {