[Scummvm-git-logs] scummvm master -> ea7955ac21886e97fcf3408894065733a71c7eda
sev-
noreply at scummvm.org
Fri Aug 22 20:37:05 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:
ea7955ac21 WAGE: Fix Quit and Return-To-Launcher events not working
Commit: ea7955ac21886e97fcf3408894065733a71c7eda
https://github.com/scummvm/scummvm/commit/ea7955ac21886e97fcf3408894065733a71c7eda
Author: Alikhan Balpykov (luxrage1990 at gmail.com)
Date: 2025-08-22T22:37:02+02:00
Commit Message:
WAGE: Fix Quit and Return-To-Launcher events not working
Changed paths:
engines/wage/gui.cpp
engines/wage/sound.cpp
engines/wage/wage.cpp
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index bfd82fb4407..87f17b561ed 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -316,7 +316,7 @@ void Gui::executeMenuCommand(int action, Common::String &text) {
break;
case kMenuActionQuit:
- _engine->saveDialog();
+ _engine->quitGame();
break;
case kMenuActionSave:
diff --git a/engines/wage/sound.cpp b/engines/wage/sound.cpp
index 0886558ab2a..8a14f91c667 100644
--- a/engines/wage/sound.cpp
+++ b/engines/wage/sound.cpp
@@ -100,8 +100,13 @@ void WageEngine::playSound(Common::String soundName) {
if (_eventMan->pollEvent(event)) {
switch (event.type) {
case Common::EVENT_QUIT:
- if (saveDialog())
- _shouldQuit = true;
+ if (!_shouldQuit) {
+ g_system->getEventManager()->resetQuit();
+ if (saveDialog()) {
+ _shouldQuit = true;
+ g_system->getEventManager()->pushEvent(event);
+ }
+ }
break;
default:
break;
diff --git a/engines/wage/wage.cpp b/engines/wage/wage.cpp
index 3eecaaf03c2..9893d426823 100644
--- a/engines/wage/wage.cpp
+++ b/engines/wage/wage.cpp
@@ -232,8 +232,15 @@ void WageEngine::processEvents() {
switch (event.type) {
case Common::EVENT_QUIT:
- if (saveDialog())
- _shouldQuit = true;
+ case Common::EVENT_RETURN_TO_LAUNCHER:
+ if (!_shouldQuit) {
+ g_system->getEventManager()->resetQuit();
+ g_system->getEventManager()->resetReturnToLauncher();
+ if (saveDialog()) {
+ _shouldQuit = true;
+ g_system->getEventManager()->pushEvent(event);
+ }
+ }
break;
case Common::EVENT_KEYDOWN:
switch (event.kbd.keycode) {
More information about the Scummvm-git-logs
mailing list