diff options
-rw-r--r-- | backends/keymapper/remap-dialog.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/backends/keymapper/remap-dialog.cpp b/backends/keymapper/remap-dialog.cpp index aca2630d6d..323790a700 100644 --- a/backends/keymapper/remap-dialog.cpp +++ b/backends/keymapper/remap-dialog.cpp @@ -243,9 +243,12 @@ void RemapDialog::handleKeyUp(Common::KeyState state) { debug( "Key: %d, %d (%c), %x", state.keycode, state.ascii, (state.ascii ? state.ascii : ' '), state.flags); if (hwkey) { + //FIXME: this leaks memory and there's no good way to get this pointer again as + //a non-const. this should be done differently when we switch to actionKeys. HardwareKey *mappedkey = new HardwareKey(*hwkey); mappedkey->description = hwkey->description; mappedkey->key.flags = (state.flags & hwkey->modMask); + _activeRemapAction->mapKey(mappedkey); _activeRemapAction->getParent()->saveMappings(); _changes = true; |