From 00321dd9de6d8c93090c601e5b44fabde2550028 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 8 Aug 2020 04:06:14 -0700 Subject: [PATCH] mGUI: Fix closing down a game if an exit is signalled --- CHANGES | 1 + src/feature/gui/gui-runner.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 0601388eb..fe174a521 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,7 @@ Other fixes: - 3DS: Redo video sync to be more precise - Qt: Add dummy English translation file (fixes mgba.io/i/1469) + - mGUI: Fix closing down a game if an exit is signalled - VFS: Fix directory node listing on some filesystems 0.8.3: (2020-08-03) diff --git a/src/feature/gui/gui-runner.c b/src/feature/gui/gui-runner.c index 54752b2e9..efa19c104 100644 --- a/src/feature/gui/gui-runner.c +++ b/src/feature/gui/gui-runner.c @@ -538,6 +538,9 @@ void mGUIRun(struct mGUIRunner* runner, const char* path) { ++frame; } } + if (!running) { + break; + } if (runner->paused) { runner->paused(runner); @@ -648,7 +651,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) {