Quit or RTL from the main menu now triggers an EVENT_QUIT in DefaultEventManager::pollEvent()

svn-id: r32813
This commit is contained in:
Christopher Page 2008-06-26 22:03:49 +00:00
parent c9a8fb25f3
commit d0dcc1ad79
2 changed files with 6 additions and 4 deletions

View File

@ -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;

View File

@ -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;
}
}