mirror of https://github.com/mgba-emu/mgba.git
SDL: Fix game crash check
This commit is contained in:
parent
10fe4a743c
commit
35b5626053
1
CHANGES
1
CHANGES
|
@ -31,6 +31,7 @@ Bugfixes:
|
||||||
- Qt: Fix linking after some windows have been closed
|
- Qt: Fix linking after some windows have been closed
|
||||||
- GBA Video: Fix wrong palette on 256-color sprites in OBJWIN
|
- GBA Video: Fix wrong palette on 256-color sprites in OBJWIN
|
||||||
- Windows: Fix VDir.rewind
|
- Windows: Fix VDir.rewind
|
||||||
|
- SDL: Fix game crash check
|
||||||
Misc:
|
Misc:
|
||||||
- SDL: Remove scancode key input
|
- SDL: Remove scancode key input
|
||||||
- GBA Video: Clean up unused timers
|
- GBA Video: Clean up unused timers
|
||||||
|
|
|
@ -194,6 +194,10 @@ int mSDLRun(struct mSDLRenderer* renderer, struct mArguments* args) {
|
||||||
if (mCoreThreadStart(&thread)) {
|
if (mCoreThreadStart(&thread)) {
|
||||||
renderer->runloop(renderer, &thread);
|
renderer->runloop(renderer, &thread);
|
||||||
mSDLPauseAudio(&renderer->audio);
|
mSDLPauseAudio(&renderer->audio);
|
||||||
|
if (mCoreThreadHasCrashed(&thread)) {
|
||||||
|
didFail = true;
|
||||||
|
printf("The game crashed!\n");
|
||||||
|
}
|
||||||
mCoreThreadJoin(&thread);
|
mCoreThreadJoin(&thread);
|
||||||
} else {
|
} else {
|
||||||
didFail = true;
|
didFail = true;
|
||||||
|
@ -204,11 +208,6 @@ int mSDLRun(struct mSDLRenderer* renderer, struct mArguments* args) {
|
||||||
mSDLResumeScreensaver(&renderer->events);
|
mSDLResumeScreensaver(&renderer->events);
|
||||||
mSDLSetScreensaverSuspendable(&renderer->events, false);
|
mSDLSetScreensaverSuspendable(&renderer->events, false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (mCoreThreadHasCrashed(&thread)) {
|
|
||||||
didFail = true;
|
|
||||||
printf("The game crashed!\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
renderer->core->unloadROM(renderer->core);
|
renderer->core->unloadROM(renderer->core);
|
||||||
return didFail;
|
return didFail;
|
||||||
|
|
Loading…
Reference in New Issue