BASE: Fix exiting scummvm_main loop in backend not allowing quit

This could be triggered using the Escape key in the launcher.
This fixes bug #14624.
This commit is contained in:
Thierry Crozat 2023-09-18 22:45:41 +01:00 committed by Eugene Sandulenko
parent 5ffee1a67c
commit e66554bb73

View File

@ -103,13 +103,19 @@ static bool launcherDialog() {
// blindly be passed to the first game launched from the launcher.
ConfMan.getDomain(Common::ConfigManager::kTransientDomain)->clear();
// If the backend does not allow quitting, loop on the launcher until a game is started
bool noQuit = g_system->hasFeature(OSystem::kFeatureNoQuit);
bool status = true;
do {
#if defined(__DC__)
DCLauncherDialog dlg;
DCLauncherDialog dlg;
#else
GUI::LauncherChooser dlg;
dlg.selectLauncher();
GUI::LauncherChooser dlg;
dlg.selectLauncher();
#endif
return (dlg.runModal() != -1);
status = (dlg.runModal() != -1);
} while (noQuit && nullptr == ConfMan.getActiveDomain());
return status;
}
static const Plugin *detectPlugin() {