[Scummvm-git-logs] scummvm master -> 553bbf60ba576ead70b1c5218d08a7b017595f52

AndywinXp noreply at scummvm.org
Fri Jun 27 07:52:58 UTC 2025


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

Summary:
553bbf60ba LASTEXPRESS: Fix exit button behavior in "confirm_exit" mode


Commit: 553bbf60ba576ead70b1c5218d08a7b017595f52
    https://github.com/scummvm/scummvm/commit/553bbf60ba576ead70b1c5218d08a7b017595f52
Author: AndywinXp (andywinxp at gmail.com)
Date: 2025-06-27T09:52:51+02:00

Commit Message:
LASTEXPRESS: Fix exit button behavior in "confirm_exit" mode

Changed paths:
    engines/lastexpress/menu/menu.cpp


diff --git a/engines/lastexpress/menu/menu.cpp b/engines/lastexpress/menu/menu.cpp
index 66891bd7870..71e79a6540c 100644
--- a/engines/lastexpress/menu/menu.cpp
+++ b/engines/lastexpress/menu/menu.cpp
@@ -30,6 +30,8 @@
 #include "lastexpress/graphics.h"
 #include "lastexpress/lastexpress.h"
 
+#include "common/config-manager.h"
+
 namespace LastExpress {
 
 Menu::Menu(LastExpressEngine *engine) {
@@ -294,8 +296,10 @@ bool Menu::eggCursorAction(int8 action, int8 flags) {
 		if ((flags & kMouseFlagLeftDown) != 0) {
 			setSprite(2, 11, true);
 
-			_engine->getSoundManager()->killAllSlots();
-			_engine->getSoundManager()->soundThread();
+			if (!ConfMan.getBool("confirm_exit")) {
+				_engine->getSoundManager()->killAllSlots();
+				_engine->getSoundManager()->soundThread();
+			}
 
 			if (_engine->isDemo()) {
 				_engine->getSoundManager()->playSoundFile("LIB046.SND", 16, 0, 0);
@@ -311,10 +315,20 @@ bool Menu::eggCursorAction(int8 action, int8 flags) {
 			g_system->delayMillis(334);
 
 			_engine->getGraphicsManager()->setMouseDrawable(false);
-			endEgg();
 
-			_engine->quitGame();
+			if (!ConfMan.getBool("confirm_exit")) {
+				endEgg();
+			}
+
+			Common::Event event;
+			event.type = Common::EVENT_QUIT;
+			g_system->getEventManager()->pushEvent(event);
+
 			_engine->_exitFromMenuButton = true;
+
+			if (ConfMan.getBool("confirm_exit")) {
+				return true;
+			}
 		} else {
 			setSprite(2, 10, true);
 			return true;




More information about the Scummvm-git-logs mailing list