SDL: Fix game crash check
Vicki Pfau vi@endrift.com
Sun, 02 Apr 2017 16:47:46 -0700
2 files changed,
5 insertions(+),
5 deletions(-)
M
CHANGES
→
CHANGES
@@ -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.c
→
src/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;