diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/gui-manager.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp index 3a665009cb..a9b8085c52 100644 --- a/gui/gui-manager.cpp +++ b/gui/gui-manager.cpp @@ -285,15 +285,6 @@ void GuiManager::runLoop() { uint32 lastRedraw = 0; const uint32 waitTime = 1000 / 45; -#ifdef ENABLE_KEYMAPPER - // Due to circular reference with event manager and GUI - // we cannot init keymap on the GUI creation. Thus, let's - // try to do it on every launch, checking whether the - // map is already existing - initKeymap(); - pushKeymap(); -#endif - bool tooltipCheck = false; while (!_dialogStack.empty() && activeDialog == getTopDialog()) { @@ -405,10 +396,6 @@ void GuiManager::runLoop() { _system->delayMillis(10); } -#ifdef ENABLE_KEYMAPPER - popKeymap(); -#endif - if (didSaveState) { _theme->disable(); restoreState(); @@ -419,6 +406,10 @@ void GuiManager::runLoop() { #pragma mark - void GuiManager::saveState() { +#ifdef ENABLE_KEYMAPPER + initKeymap(); + pushKeymap(); +#endif // Backup old cursor _lastClick.x = _lastClick.y = 0; _lastClick.time = 0; @@ -428,6 +419,9 @@ void GuiManager::saveState() { } void GuiManager::restoreState() { +#ifdef ENABLE_KEYMAPPER + popKeymap(); +#endif if (_useStdCursor) { CursorMan.popCursor(); CursorMan.popCursorPalette(); |