diff options
Diffstat (limited to 'backends/keymapper/remap-dialog.cpp')
-rw-r--r-- | backends/keymapper/remap-dialog.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/backends/keymapper/remap-dialog.cpp b/backends/keymapper/remap-dialog.cpp index 323790a700..0a93785c08 100644 --- a/backends/keymapper/remap-dialog.cpp +++ b/backends/keymapper/remap-dialog.cpp @@ -243,14 +243,9 @@ 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->mapKey(hwkey,state.flags); _activeRemapAction->getParent()->saveMappings(); + _changes = true; stopRemapping(); } |