aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2008-09-02 13:27:26 +0000
committerJohannes Schickel2008-09-02 13:27:26 +0000
commit34d43e3319ad814e2890098a1e676d2936cae2b7 (patch)
tree7b771c17380fa9a31b0f0fffc2706ef992d847de
parentb235b51e627b15a45af8ef2f289db82f72c1d3ad (diff)
downloadscummvm-rg350-34d43e3319ad814e2890098a1e676d2936cae2b7.tar.gz
scummvm-rg350-34d43e3319ad814e2890098a1e676d2936cae2b7.tar.bz2
scummvm-rg350-34d43e3319ad814e2890098a1e676d2936cae2b7.zip
Applied my patch from -devel, which reenables GMM opening via F6.
svn-id: r34281
-rw-r--r--backends/events/default/default-events.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index 65b375605b..c503e6a536 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -393,7 +393,7 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
#endif
// Global Main Menu
// FIXME: F6 is not the best trigger, it conflicts with some games!!!
- if (event.kbd.keycode == Common::KEYCODE_F6)
+ if (event.kbd.keycode == Common::KEYCODE_F6) {
if (g_engine && !g_engine->isPaused()) {
Common::Event menuEvent;
menuEvent.type = Common::EVENT_MAINMENU;
@@ -409,7 +409,21 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
//pushEvent(menuEvent);
event = menuEvent;
+
+ // FIXME: Since now we do not push another MAINMENU event onto
+ // our event stack, the GMM would never open, so we have to do
+ // that here. Of course when the engine would handle MAINMENU
+ // as an event now and open up the GMM itself it would open the
+ // menu twice.
+ 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_KEYUP: