[Scummvm-git-logs] scummvm master -> 6eb68493aa9ba9db0c14eb4cbf09610a37788767

criezy criezy at scummvm.org
Thu Jan 21 00:12:59 UTC 2021


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:
6eb68493aa GUI: Do not block return to the launcher when a dialog is shown


Commit: 6eb68493aa9ba9db0c14eb4cbf09610a37788767
    https://github.com/scummvm/scummvm/commit/6eb68493aa9ba9db0c14eb4cbf09610a37788767
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-01-21T00:12:33Z

Commit Message:
GUI: Do not block return to the launcher when a dialog is shown

When accessing a GUI dialog from a game, such as to save or load
a game, we are still able to quit if the force RTL option is not
enabled. But when that option is enabled, it only returned to
the launcher after closing the dialog, which is strange and a
discrepency with the quit behaviour. This commit implements the
same behaviour for RTL as we have for Quit.

Changed paths:
    gui/gui-manager.cpp


diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp
index 50eb8d2a7b..dc6ad96e77 100644
--- a/gui/gui-manager.cpp
+++ b/gui/gui-manager.cpp
@@ -354,7 +354,7 @@ void GuiManager::runLoop() {
 	Common::EventManager *eventMan = _system->getEventManager();
 	const uint32 targetFrameDuration = 1000 / 60;
 
-	while (!_dialogStack.empty() && activeDialog == getTopDialog() && !eventMan->shouldQuit()) {
+	while (!_dialogStack.empty() && activeDialog == getTopDialog() && !eventMan->shouldQuit() && (!g_engine || !eventMan->shouldReturnToLauncher())) {
 		uint32 frameStartTime = _system->getMillis(true);
 
 		// Don't "tickle" the dialog until the theme has had a chance
@@ -434,7 +434,7 @@ void GuiManager::runLoop() {
 	// it will never be removed. Since we can have multiple run loops being
 	// called we cannot rely on catching EVENT_QUIT in the event loop above,
 	// since it would only catch it for the top run loop.
-	if (eventMan->shouldQuit() && activeDialog == getTopDialog())
+	if ((eventMan->shouldQuit() || (g_engine && eventMan->shouldReturnToLauncher())) && activeDialog == getTopDialog())
 		getTopDialog()->close();
 
 	if (didSaveState) {




More information about the Scummvm-git-logs mailing list