aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/draci.cpp
diff options
context:
space:
mode:
authorRobert Špalek2010-01-10 01:25:37 +0000
committerRobert Špalek2010-01-10 01:25:37 +0000
commit96068d30d937c5529e730ac61fd1ba26f69d7706 (patch)
tree9257671dcab1e2b5d16f3e4a11ba79aad6c82f5e /engines/draci/draci.cpp
parent2c1ef90b8766d1abf2e484de989913e29436234c (diff)
downloadscummvm-rg350-96068d30d937c5529e730ac61fd1ba26f69d7706.tar.gz
scummvm-rg350-96068d30d937c5529e730ac61fd1ba26f69d7706.tar.bz2
scummvm-rg350-96068d30d937c5529e730ac61fd1ba26f69d7706.zip
Handle properly shouldQuit()
svn-id: r47215
Diffstat (limited to 'engines/draci/draci.cpp')
-rw-r--r--engines/draci/draci.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/draci/draci.cpp b/engines/draci/draci.cpp
index e098dc969e..ff3815ffb7 100644
--- a/engines/draci/draci.cpp
+++ b/engines/draci/draci.cpp
@@ -223,11 +223,6 @@ void DraciEngine::handleEvents() {
while (_eventMan->pollEvent(event)) {
switch (event.type) {
- case Common::EVENT_QUIT:
- case Common::EVENT_RTL:
- _game->setQuit(true);
- _script->endCurrentProgram(true);
- break;
case Common::EVENT_KEYDOWN:
switch (event.kbd.keycode) {
case Common::KEYCODE_RIGHT:
@@ -310,6 +305,12 @@ void DraciEngine::handleEvents() {
_mouse->handleEvent(event);
}
}
+
+ // Handle EVENT_QUIT and EVENT_RTL.
+ if (shouldQuit()) {
+ _game->setQuit(true);
+ _script->endCurrentProgram(true);
+ }
}
DraciEngine::~DraciEngine() {