diff options
author | Christopher Page | 2008-06-26 22:03:49 +0000 |
---|---|---|
committer | Christopher Page | 2008-06-26 22:03:49 +0000 |
commit | d0dcc1ad7943a528f0f4f016a64ee45251adb6a8 (patch) | |
tree | ecc910e2cc1024a51291ee23751fcfe269652f66 | |
parent | c9a8fb25f3ce5c1e69c1cb16a788167a648d68ea (diff) | |
download | scummvm-rg350-d0dcc1ad7943a528f0f4f016a64ee45251adb6a8.tar.gz scummvm-rg350-d0dcc1ad7943a528f0f4f016a64ee45251adb6a8.tar.bz2 scummvm-rg350-d0dcc1ad7943a528f0f4f016a64ee45251adb6a8.zip |
Quit or RTL from the main menu now triggers an EVENT_QUIT in DefaultEventManager::pollEvent()
svn-id: r32813
-rw-r--r-- | backends/events/default/default-events.cpp | 7 | ||||
-rw-r--r-- | engines/sky/intro.cpp | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp index 6343f1f9c5..2c4785da2d 100644 --- a/backends/events/default/default-events.cpp +++ b/backends/events/default/default-events.cpp @@ -388,8 +388,11 @@ bool DefaultEventManager::pollEvent(Common::Event &event) { if (event.kbd.keycode == Common::KEYCODE_F11) if (g_engine && !g_engine->isPaused()) g_engine->mainMenuDialog(); - - break; + + if (!g_engine->_quit) + break; + else + event.type = Common::EVENT_QUIT; case Common::EVENT_KEYUP: _modifierState = event.kbd.flags; diff --git a/engines/sky/intro.cpp b/engines/sky/intro.cpp index 56c2fff1b4..51160924da 100644 --- a/engines/sky/intro.cpp +++ b/engines/sky/intro.cpp @@ -911,8 +911,7 @@ bool Intro::escDelay(uint32 msecs) { if (event.type == Common::EVENT_KEYDOWN) { if (event.kbd.keycode == Common::KEYCODE_ESCAPE) return false; - } else if (event.type == Common::EVENT_QUIT || g_engine->_quit) { - g_engine->_quit = true; + } else if (event.type == Common::EVENT_QUIT) { return false; } } |