[Scummvm-cvs-logs] SF.net SVN: scummvm:[43399] scummvm/branches/gsoc2009-16bit/backends/ keymapper/remap-dialog.cpp

upthorn at users.sourceforge.net upthorn at users.sourceforge.net
Sat Aug 15 11:15:10 CEST 2009


Revision: 43399
          http://scummvm.svn.sourceforge.net/scummvm/?rev=43399&view=rev
Author:   upthorn
Date:     2009-08-15 09:15:09 +0000 (Sat, 15 Aug 2009)

Log Message:
-----------
Commented a memory leak whose fix requires a fundamental modification to the Action structure (replacing KeyState with ActionKey should do it)

Modified Paths:
--------------
    scummvm/branches/gsoc2009-16bit/backends/keymapper/remap-dialog.cpp

Modified: scummvm/branches/gsoc2009-16bit/backends/keymapper/remap-dialog.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/keymapper/remap-dialog.cpp	2009-08-15 09:12:36 UTC (rev 43398)
+++ scummvm/branches/gsoc2009-16bit/backends/keymapper/remap-dialog.cpp	2009-08-15 09:15:09 UTC (rev 43399)
@@ -243,9 +243,12 @@
 		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;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list