[Scummvm-git-logs] scummvm master -> 73ef69b0fa8184c148ef2db9a5db6045b29f7985
fracturehill
noreply at scummvm.org
Sat Nov 11 20:53:26 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:
73ef69b0fa NANCY: Fix quitting from main menu with confirm dialog
Commit: 73ef69b0fa8184c148ef2db9a5db6045b29f7985
https://github.com/scummvm/scummvm/commit/73ef69b0fa8184c148ef2db9a5db6045b29f7985
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-11-11T22:52:23+02:00
Commit Message:
NANCY: Fix quitting from main menu with confirm dialog
Fixed an issue where, if the player has checked the
ScummVM "Ask for confirmation on exit" option, and has
clicked the Cancel button on said prompt, the main menu
code would keep showing it again and again until the
user quits.
Changed paths:
engines/nancy/state/mainmenu.cpp
diff --git a/engines/nancy/state/mainmenu.cpp b/engines/nancy/state/mainmenu.cpp
index 83307df444c..99891987351 100644
--- a/engines/nancy/state/mainmenu.cpp
+++ b/engines/nancy/state/mainmenu.cpp
@@ -215,7 +215,8 @@ void MainMenu::stop() {
case 1 :
// "No" quits the game
g_nancy->quitGame();
- break;
+
+ // fall through
case 2 :
// "Cancel" keeps us in the main menu
_selected = -1;
@@ -231,6 +232,15 @@ void MainMenu::stop() {
} else {
// Earlier games had no "Do you want to save before quitting" dialog, directly quit
g_nancy->quitGame();
+
+ // Fallback for when the ScummVM "Ask for confirmation on exit" option is enabled, and
+ // the player clicks cancel
+ _selected = -1;
+ for (uint i = 0; i < _buttons.size(); ++i) {
+ _buttons[i]->_isClicked = false;
+ }
+ _state = kRun;
+ break;
}
break;
More information about the Scummvm-git-logs
mailing list