diff options
author | Christopher Page | 2008-07-16 04:22:56 +0000 |
---|---|---|
committer | Christopher Page | 2008-07-16 04:22:56 +0000 |
commit | 7f480ac571f978802a3ecd5cf6169d0271d1f561 (patch) | |
tree | dcd550f0c84bec20aa3cfe5ffc4604a51f174ef6 /backends/events/default/default-events.cpp | |
parent | 7ecd54a9da6b9a14b4f16c3e53f87475d43bc2da (diff) | |
download | scummvm-rg350-7f480ac571f978802a3ecd5cf6169d0271d1f561.tar.gz scummvm-rg350-7f480ac571f978802a3ecd5cf6169d0271d1f561.tar.bz2 scummvm-rg350-7f480ac571f978802a3ecd5cf6169d0271d1f561.zip |
Quit and RTL code is more modular now. EVENT_RTL no longer sets _shouldQuit, shouldQuit is only set if there's an EVENT_QUIT. EVENT_RTL and EVENT_QUIT are completely separate from each other. Engine::quit() method now checks both _shouldQuit and _shouldRTL to determine if the engine should exit. There is no longer a need for resetQuit(), so it's removed
svn-id: r33082
Diffstat (limited to 'backends/events/default/default-events.cpp')
-rw-r--r-- | backends/events/default/default-events.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp index 8648c5909e..b070fb89ef 100644 --- a/backends/events/default/default-events.cpp +++ b/backends/events/default/default-events.cpp @@ -435,13 +435,15 @@ bool DefaultEventManager::pollEvent(Common::Event &event) { case Common::EVENT_MAINMENU: if (g_engine && !g_engine->isPaused()) g_engine->mainMenuDialog(); + if (_shouldQuit) event.type = Common::EVENT_QUIT; + else if (_shouldRTL) + event.type = Common::EVENT_RTL; break; case Common::EVENT_RTL: _shouldRTL = true; - _shouldQuit = true; break; case Common::EVENT_QUIT: |