aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2013-07-27 21:40:27 +0200
committerEinar Johan Trøan Sømåen2013-07-27 21:40:27 +0200
commit28b85375306e08a04360dacf070c496dc5d1dbd2 (patch)
tree2780a68274af99c02bb5871f0771e8791c76804a
parentb43bac61924d053b470125cf77ade6b72a17aeb7 (diff)
downloadscummvm-rg350-28b85375306e08a04360dacf070c496dc5d1dbd2.tar.gz
scummvm-rg350-28b85375306e08a04360dacf070c496dc5d1dbd2.tar.bz2
scummvm-rg350-28b85375306e08a04360dacf070c496dc5d1dbd2.zip
WINTERMUTE: Respect EVENT_QUIT properly (and don't ask to quit anymore)
-rw-r--r--engines/wintermute/platform_osystem.cpp9
-rw-r--r--engines/wintermute/wintermute.cpp3
2 files changed, 9 insertions, 3 deletions
diff --git a/engines/wintermute/platform_osystem.cpp b/engines/wintermute/platform_osystem.cpp
index 362c0da624..8b1a6e38e9 100644
--- a/engines/wintermute/platform_osystem.cpp
+++ b/engines/wintermute/platform_osystem.cpp
@@ -125,9 +125,12 @@ void BasePlatform::handleEvent(Common::Event *event) {
// _gameRef->AutoSaveOnExit();
// _gameRef->_quitting = true;
// }
- if (_gameRef) {
- _gameRef->onWindowClose();
- }
+
+// The engine CAN query for closing, but we disable it for now, as the EVENT_QUIT-event
+// can't be stopped.
+// if (_gameRef) {
+// _gameRef->onWindowClose();
+// }
break;
default:
// TODO: Do we care about any other events?
diff --git a/engines/wintermute/wintermute.cpp b/engines/wintermute/wintermute.cpp
index 19848b002e..202b261599 100644
--- a/engines/wintermute/wintermute.cpp
+++ b/engines/wintermute/wintermute.cpp
@@ -250,6 +250,9 @@ int WintermuteEngine::messageLoop() {
}
prevTime = time;
}
+ if (shouldQuit()) {
+ break;
+ }
if (_game && _game->_quitting) {
break;
}