diff options
author | Jody Northup | 2009-08-15 09:15:09 +0000 |
---|---|---|
committer | Jody Northup | 2009-08-15 09:15:09 +0000 |
commit | 7ff9bb3a6b543777891d90a645c669b975e64445 (patch) | |
tree | 5f411b388e0775b9bd33fcc95ca7a6b099a53cf4 /backends/keymapper/remap-dialog.cpp | |
parent | 8d051e24feeb2e7410d7676328ad66fbf04a95c8 (diff) | |
download | scummvm-rg350-7ff9bb3a6b543777891d90a645c669b975e64445.tar.gz scummvm-rg350-7ff9bb3a6b543777891d90a645c669b975e64445.tar.bz2 scummvm-rg350-7ff9bb3a6b543777891d90a645c669b975e64445.zip |
Commented a memory leak whose fix requires a fundamental modification to the Action structure (replacing KeyState with ActionKey should do it)
svn-id: r43399
Diffstat (limited to 'backends/keymapper/remap-dialog.cpp')
-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; |