all repos — mgba @ 35b5626053dea8a4c53c63b6da23831fea6bb649

mGBA Game Boy Advance Emulator

SDL: Fix game crash check
Vicki Pfau vi@endrift.com
Sun, 02 Apr 2017 16:47:46 -0700
commit

35b5626053dea8a4c53c63b6da23831fea6bb649

parent

10fe4a743c1b01c496987b5cac2dfc479e89c8dc

2 files changed, 5 insertions(+), 5 deletions(-)

jump to
M CHANGESCHANGES

@@ -31,6 +31,7 @@ - Util: Fix highest-fd socket not being returned by SocketAccept

- Qt: Fix linking after some windows have been closed - GBA Video: Fix wrong palette on 256-color sprites in OBJWIN - Windows: Fix VDir.rewind + - SDL: Fix game crash check Misc: - SDL: Remove scancode key input - GBA Video: Clean up unused timers
M src/platform/sdl/main.csrc/platform/sdl/main.c

@@ -194,6 +194,10 @@ #endif

if (mCoreThreadStart(&thread)) { renderer->runloop(renderer, &thread); mSDLPauseAudio(&renderer->audio); + if (mCoreThreadHasCrashed(&thread)) { + didFail = true; + printf("The game crashed!\n"); + } mCoreThreadJoin(&thread); } else { didFail = true;

@@ -204,11 +208,6 @@ #if SDL_VERSION_ATLEAST(2, 0, 0)

mSDLResumeScreensaver(&renderer->events); mSDLSetScreensaverSuspendable(&renderer->events, false); #endif - - if (mCoreThreadHasCrashed(&thread)) { - didFail = true; - printf("The game crashed!\n"); - } } renderer->core->unloadROM(renderer->core); return didFail;