diff options
author | Max Horn | 2007-06-30 18:22:21 +0000 |
---|---|---|
committer | Max Horn | 2007-06-30 18:22:21 +0000 |
commit | fed38a794f8cd810e7b50f59d71b4c0fc581d6fc (patch) | |
tree | 39972f0dfb98966035fb999a520848c39ccc2aed /backends/events/default/default-events.cpp | |
parent | 6064b876259ce7beca2c32d1b48ea0817149136b (diff) | |
download | scummvm-rg350-fed38a794f8cd810e7b50f59d71b4c0fc581d6fc.tar.gz scummvm-rg350-fed38a794f8cd810e7b50f59d71b4c0fc581d6fc.tar.bz2 scummvm-rg350-fed38a794f8cd810e7b50f59d71b4c0fc581d6fc.zip |
Added Engine::pauseEngine method (allows outside code, like the backend, to pause/resume the active engine); made the global 'confirm exit' dialog use that feature; implemented ScummEngine::pauseEngine
svn-id: r27797
Diffstat (limited to 'backends/events/default/default-events.cpp')
-rw-r--r-- | backends/events/default/default-events.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp index 14f4249b42..af2d688d43 100644 --- a/backends/events/default/default-events.cpp +++ b/backends/events/default/default-events.cpp @@ -29,6 +29,8 @@ #include "common/config-manager.h" #include "common/system.h" #include "backends/events/default/default-events.h" + +#include "engines/engine.h" #include "gui/message.h" DefaultEventManager::DefaultEventManager(OSystem *boss) : @@ -96,12 +98,10 @@ bool DefaultEventManager::pollEvent(Common::Event &event) { case Common::EVENT_QUIT: if (ConfMan.getBool("confirm_exit")) { + g_engine->pauseEngine(true); GUI::MessageDialog alert("Do you really want to quit?", "Yes", "No"); - if (alert.runModal() == GUI::kMessageOK) - _shouldQuit = true; - else - result = false; - + result = _shouldQuit = (alert.runModal() == GUI::kMessageOK); + g_engine->pauseEngine(false); } else _shouldQuit = true; break; |