aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTarek Soliman2011-10-22 14:50:40 -0500
committerTarek Soliman2011-10-27 10:46:23 -0500
commitb8ef739d142577d3415ec7e8302d5da2df9ce252 (patch)
tree38c64036643d0eaeb47c2c2a08b3997c731d9173
parent56b5c0ea9fba89eeb1c2e1e70ded9049ba058865 (diff)
downloadscummvm-rg350-b8ef739d142577d3415ec7e8302d5da2df9ce252.tar.gz
scummvm-rg350-b8ef739d142577d3415ec7e8302d5da2df9ce252.tar.bz2
scummvm-rg350-b8ef739d142577d3415ec7e8302d5da2df9ce252.zip
KEYMAPPER: Only skip the top GUI keymap when populating the active keymap
This is because the top GUI keymap is for the keymapper dialog itself. If all GUI keymaps are skipped then when inside a game with the GMM displayed and the keymapper dialog invoked, the game keymap is displayed even though it is not the active one.
-rw-r--r--backends/keymapper/remap-dialog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/backends/keymapper/remap-dialog.cpp b/backends/keymapper/remap-dialog.cpp
index adbf199960..44d7e273dd 100644
--- a/backends/keymapper/remap-dialog.cpp
+++ b/backends/keymapper/remap-dialog.cpp
@@ -308,9 +308,9 @@ void RemapDialog::loadKeymap() {
List<const HardwareKey*> freeKeys(_keymapper->getHardwareKeys());
int topIndex = activeKeymaps.size() - 1;
- // skip all gui maps
+ // skip the top gui keymap since it is for the keymapper itself
// TODO: Don't use the keymap name as a way to discriminate GUI maps
- while (topIndex > 0 && activeKeymaps[topIndex].keymap->getName().equals(kGuiKeymapName))
+ if (topIndex > 0 && activeKeymaps[topIndex].keymap->getName().equals(kGuiKeymapName))
--topIndex;
// add most active keymap's keys