[Scummvm-git-logs] scummvm master -> 09de1bbca8f83fb8f154ea9cb9070af48fa2112d
lephilousophe
noreply at scummvm.org
Sat May 4 16:15:46 UTC 2024
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:
09de1bbca8 Revert "ENGINES: Allow shouldQuit to return true immediately"
Commit: 09de1bbca8f83fb8f154ea9cb9070af48fa2112d
https://github.com/scummvm/scummvm/commit/09de1bbca8f83fb8f154ea9cb9070af48fa2112d
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2024-05-04T18:15:42+02:00
Commit Message:
Revert "ENGINES: Allow shouldQuit to return true immediately"
This reverts commit 741620e4bc3c11b9bbe567ac4ef789975a6efe0e.
This commit breaks several engines like scumm and sword1 because they
call quitEngine function without polling the event loop afterwards.
Purging the event loop after the engine has finished would solve this,
but the EVENT_QUIT message is supposed to be processed while the engine
is still running to let user confirm the quit action (if the setting is
enabled).
Changed paths:
engines/engine.cpp
engines/engine.h
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 91b84314899..cc2a6d61290 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -64,7 +64,6 @@
// FIXME: HACK for error()
Engine *g_engine = 0;
-bool Engine::_quitRequested;
// Output formatter for debug() and error() which invokes
// the errorString method of the active engine, if any.
@@ -154,7 +153,6 @@ Engine::Engine(OSystem *syst)
_lastAutosaveTime(_system->getMillis()) {
g_engine = this;
- _quitRequested = false;
Common::setErrorOutputFormatter(defaultOutputFormatter);
Common::setErrorHandler(defaultErrorHandler);
@@ -985,13 +983,11 @@ void Engine::quitGame() {
event.type = Common::EVENT_QUIT;
g_system->getEventManager()->pushEvent(event);
- _quitRequested = true;
}
bool Engine::shouldQuit() {
Common::EventManager *eventMan = g_system->getEventManager();
- return eventMan->shouldQuit() || eventMan->shouldReturnToLauncher()
- || _quitRequested;
+ return (eventMan->shouldQuit() || eventMan->shouldReturnToLauncher());
}
GUI::Debugger *Engine::getOrCreateDebugger() {
diff --git a/engines/engine.h b/engines/engine.h
index 0b176bee852..ade46d5fd9b 100644
--- a/engines/engine.h
+++ b/engines/engine.h
@@ -233,13 +233,9 @@ private:
* Optional debugger for the engine.
*/
GUI::Debugger *_debugger;
+public:
- /**
- * Flag for whether the quitGame method has been called
- */
- static bool _quitRequested;
-public:
/**
* Engine features.
*
More information about the Scummvm-git-logs
mailing list