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

criezy criezy at scummvm.org
Wed Jan 20 23:37:54 UTC 2021


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

Summary:
07706e5f78 GRIFFON: Fix Return to Launcher
a1c807704d ALL: Ignore force RTL option when the engine does not support RTL


Commit: 07706e5f78d2330f979871a98206cdc86fbc76c3
    https://github.com/scummvm/scummvm/commit/07706e5f78d2330f979871a98206cdc86fbc76c3
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-01-20T23:23:21Z

Commit Message:
GRIFFON: Fix Return to Launcher

The griffon engine claimed to surport the kSupportsReturnToLauncher
feature, but in practice it did not work as it only checked the
EVENT_QUIT and not the EVENT_RETURN_TO_LAUNCHER.

Changed paths:
    NEWS.md
    engines/griffon/cutscenes.cpp
    engines/griffon/dialogs.cpp
    engines/griffon/input.cpp


diff --git a/NEWS.md b/NEWS.md
index 168ead42f1..58e3ad1c52 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -34,6 +34,9 @@ For a more comprehensive changelog of the latest experimental code, see:
    - Added support for Bargon Attack Russian translation.
    - Added support for Woodruff Russian translation.
 
+ Griffon:
+   - Fixed Return to Launcher from The Griffon Legend.
+
  Grim:
    - Added support for Brazillian Portuguese Grim Fandango.
    - Added support for Russian EMI.
diff --git a/engines/griffon/cutscenes.cpp b/engines/griffon/cutscenes.cpp
index 04488d8322..9de5f70b04 100644
--- a/engines/griffon/cutscenes.cpp
+++ b/engines/griffon/cutscenes.cpp
@@ -41,13 +41,13 @@
 namespace Griffon {
 
 #define POLL_AND_CHECK_QUIT() 		if (g_system->getEventManager()->pollEvent(_event)) { \
-		if (_event.type == Common::EVENT_QUIT) { \
+		if (_event.type == Common::EVENT_QUIT || _event.type == Common::EVENT_RETURN_TO_LAUNCHER) { \
 			_shouldQuit = true; \
 			return; \
 		} \
 	}
 
-#define CHECK_QUIT() 		if (_event.type == Common::EVENT_QUIT) { \
+#define CHECK_QUIT() 		if (_event.type == Common::EVENT_QUIT || _event.type == Common::EVENT_RETURN_TO_LAUNCHER) { \
 		_shouldQuit = true; \
 		return; \
 	}
diff --git a/engines/griffon/dialogs.cpp b/engines/griffon/dialogs.cpp
index a3337783bd..c76354e5ec 100644
--- a/engines/griffon/dialogs.cpp
+++ b/engines/griffon/dialogs.cpp
@@ -160,7 +160,7 @@ void GriffonEngine::title(int mode) {
 			_itemyloc = _itemyloc - 16;
 
 		if (g_system->getEventManager()->pollEvent(_event)) {
-			if (_event.type == Common::EVENT_QUIT)
+			if (_event.type == Common::EVENT_QUIT || _event.type == Common::EVENT_RETURN_TO_LAUNCHER)
 				_shouldQuit = true;
 
 			if (_event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_START) {
@@ -353,6 +353,7 @@ void GriffonEngine::configMenu() {
 		while (g_system->getEventManager()->pollEvent(_event)) {
 			switch (_event.type) {
 			case Common::EVENT_QUIT:
+			case Common::EVENT_RETURN_TO_LAUNCHER:
 				_shouldQuit = true;
 				break;
 
@@ -592,7 +593,7 @@ void GriffonEngine::saveLoadNew() {
 		_saveLoadImg->blit(*_videoBuffer);
 
 		if (g_system->getEventManager()->pollEvent(_event)) {
-			if (_event.type == Common::EVENT_QUIT) {
+			if (_event.type == Common::EVENT_QUIT || _event.type == Common::EVENT_RETURN_TO_LAUNCHER) {
 				_shouldQuit = true;
 				return;
 			}
diff --git a/engines/griffon/input.cpp b/engines/griffon/input.cpp
index d21dbbfdbf..7b9c321ca9 100644
--- a/engines/griffon/input.cpp
+++ b/engines/griffon/input.cpp
@@ -69,7 +69,7 @@ void GriffonEngine::checkInputs() {
 	if (_attacking || (_forcePause && !_itemSelOn))
 		return;
 
-	if (_event.type == Common::EVENT_QUIT) {
+	if (_event.type == Common::EVENT_QUIT || _event.type == Common::EVENT_RETURN_TO_LAUNCHER) {
 		_shouldQuit = true;
 		return;
 	}


Commit: a1c807704d55c7ffa52a131ef448a8db9e721262
    https://github.com/scummvm/scummvm/commit/a1c807704d55c7ffa52a131ef448a8db9e721262
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-01-20T23:35:47Z

Commit Message:
ALL: Ignore force RTL option when the engine does not support RTL

This fixes bug #12072: Cannot quit Blazing Dragons when always
return to launcher is selected

Changed paths:
    backends/events/default/default-events.cpp
    base/main.cpp
    engines/dialogs.cpp


diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index 374c94a3e1..65a085bd31 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -99,7 +99,7 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
 	// replace "Quit" event with "Return to Launcher". This is also handled in scummvm_main, but
 	// doing it here allows getting the correct confirmation dialog if the "confirm_exit" setting
 	// is set to true.
-	if (event.type == Common::EVENT_QUIT && (g_system->hasFeature(OSystem::kFeatureNoQuit) || (ConfMan.getBool("gui_return_to_launcher_at_exit") && g_engine)))
+	if (event.type == Common::EVENT_QUIT && (g_system->hasFeature(OSystem::kFeatureNoQuit) || (ConfMan.getBool("gui_return_to_launcher_at_exit") && g_engine && g_engine->hasFeature(Engine::kSupportsReturnToLauncher))))
 		event.type = Common::EVENT_RETURN_TO_LAUNCHER;
 
 	switch (event.type) {
diff --git a/base/main.cpp b/base/main.cpp
index 65800f1164..d0a33ec184 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -306,6 +306,10 @@ static Common::Error runGame(const Plugin *plugin, OSystem &system, const Common
 	// Run the engine
 	Common::Error result = engine->run();
 
+	// Make sure we do not return to the launcher if this is not possible.
+	if (!engine->hasFeature(Engine::kSupportsReturnToLauncher))
+		ConfMan.setBool("gui_return_to_launcher_at_exit", false, Common::ConfigManager::kTransientDomain);
+
 	// Inform backend that the engine finished
 	system.engineDone();
 
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index 3a233ca90c..349aa0161f 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -95,7 +95,7 @@ MainMenuDialog::MainMenuDialog(Engine *engine)
 		_returnToLauncherButton = new GUI::ButtonWidget(this, "GlobalMenu.ReturnToLauncher", _c("~R~eturn to Launcher", "lowres"), Common::U32String(), kLauncherCmd);
 	_returnToLauncherButton->setEnabled(_engine->hasFeature(Engine::kSupportsReturnToLauncher));
 
-	if (!g_system->hasFeature(OSystem::kFeatureNoQuit) && !(ConfMan.getBool("gui_return_to_launcher_at_exit")))
+	if (!g_system->hasFeature(OSystem::kFeatureNoQuit) && (!(ConfMan.getBool("gui_return_to_launcher_at_exit")) || !_engine->hasFeature(Engine::kSupportsReturnToLauncher)))
 		new GUI::ButtonWidget(this, "GlobalMenu.Quit", _("~Q~uit"), Common::U32String(), kQuitCmd);
 
 	_aboutDialog = new GUI::AboutDialog();




More information about the Scummvm-git-logs mailing list