diff options
Diffstat (limited to 'backends/keymapper')
-rw-r--r-- | backends/keymapper/remap-dialog.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/backends/keymapper/remap-dialog.cpp b/backends/keymapper/remap-dialog.cpp index 8f187778d8..bf4144a59f 100644 --- a/backends/keymapper/remap-dialog.cpp +++ b/backends/keymapper/remap-dialog.cpp @@ -61,7 +61,7 @@ void RemapDialog::open() { const Stack<Keymapper::MapRecord> &activeKeymaps = _keymapper->getActiveStack(); if (activeKeymaps.size() > 0) { - _kmPopUp->appendEntry(activeKeymaps.top().keymap->getName() + _(" (Active)")); + _kmPopUp->appendEntry(activeKeymaps.top().keymap->getName() + _(" (Effective)")); divider = true; } @@ -84,6 +84,10 @@ void RemapDialog::open() { keymapCount += _gameKeymaps->size(); } + if (activeKeymaps.size() > 1) { + keymapCount += activeKeymaps.size() - 1; + } + debug(3, "RemapDialog::open keymaps: %d", keymapCount); _keymapTable = (Keymap **)malloc(sizeof(Keymap*) * keymapCount); @@ -91,6 +95,18 @@ void RemapDialog::open() { Keymapper::Domain::iterator it; uint32 idx = 0; + if (activeKeymaps.size() > 1) { + if (divider) + _kmPopUp->appendEntry(""); + int topIndex = activeKeymaps.size() - 1; + for (int i = topIndex - 1; i >= 0; --i) { + Keymapper::MapRecord mr = activeKeymaps[i]; + _kmPopUp->appendEntry(mr.keymap->getName() + _(" (Active)"), idx); + _keymapTable[idx++] = mr.keymap; + } + divider = true; + } + if (_globalKeymaps) { if (divider) _kmPopUp->appendEntry(""); @@ -108,6 +124,7 @@ void RemapDialog::open() { _kmPopUp->appendEntry(it->_value->getName() + _(" (Game)"), idx); _keymapTable[idx++] = it->_value; } + divider = true; } _changes = false; |