mGUI: Fix closing down a game if an exit is signalled

This commit is contained in:
Vicki Pfau 2020-08-08 04:06:14 -07:00
parent e131831238
commit 214febf727
2 changed files with 5 additions and 1 deletions

View File

@ -35,6 +35,7 @@ Other fixes:
- Qt: Fix static compilation in MinGW (fixes mgba.io/i/1769)
- Qt: Fix a race condition in the frame inspector
- Qt: Add dummy English translation file (fixes mgba.io/i/1469)
- mGUI: Fix closing down a game if an exit is signalled
- SM83: Simplify register pair access on big endian
- VFS: Fix directory node listing on some filesystems
Misc:

View File

@ -541,6 +541,9 @@ void mGUIRun(struct mGUIRunner* runner, const char* path) {
++frame;
}
}
if (!running) {
break;
}
if (runner->paused) {
runner->paused(runner);
@ -651,7 +654,7 @@ void mGUIRunloop(struct mGUIRunner* runner) {
mInputMapLoad(&runner->params.keyMap, runner->keySources[i].id, mCoreConfigGetInput(&runner->config));
}
}
while (true) {
while (runner->running(runner)) {
char path[PATH_MAX];
const char* preselect = mCoreConfigGetValue(&runner->config, "lastGame");
if (preselect) {