[Scummvm-git-logs] scummvm master -> e66554bb734237dce423339ea6956ffc2cb1bcb1

sev- noreply at scummvm.org
Wed Sep 20 00:14:44 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
e66554bb73 BASE: Fix exiting scummvm_main loop in backend not allowing quit


Commit: e66554bb734237dce423339ea6956ffc2cb1bcb1
    https://github.com/scummvm/scummvm/commit/e66554bb734237dce423339ea6956ffc2cb1bcb1
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2023-09-20T02:14:40+02:00

Commit Message:
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.

Changed paths:
    base/main.cpp


diff --git a/base/main.cpp b/base/main.cpp
index 44098d82e02..d891e8db322 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -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() {




More information about the Scummvm-git-logs mailing list