[Scummvm-cvs-logs] scummvm master -> 73160e54b43180b1fcc8f9de0a548e5817d0d1cd
tsoliman
tarek at bashasoliman.com
Sun Jan 8 03:52:38 CET 2012
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
73160e54b4 KEYMAPPER: Only push/pop the gui keymap once per gui session
Commit: 73160e54b43180b1fcc8f9de0a548e5817d0d1cd
https://github.com/scummvm/scummvm/commit/73160e54b43180b1fcc8f9de0a548e5817d0d1cd
Author: Tarek Soliman (tsoliman at scummvm.org)
Date: 2012-01-07T18:48:49-08:00
Commit Message:
KEYMAPPER: Only push/pop the gui keymap once per gui session
The removes a bit of waste when gui dialogs are opened.
Multiple gui keymaps were being pushed.
Changed paths:
gui/gui-manager.cpp
diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp
index 3a66500..a9b8085 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();
More information about the Scummvm-git-logs
mailing list