We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2456

Summary: controllermap's "Undo" feature does not work correctly
Product: SDL Reporter: Bogdan Marinov <daggerstab>
Component: joystickAssignee: Gabriel Jacobo <gabomdq>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: gabomdq
Version: HG 2.1   
Hardware: x86   
OS: Linux   
Attachments: Patch fixing the controllermap bug.

Description Bogdan Marinov 2014-03-19 22:03:58 UTC
Created attachment 1597 [details]
Patch fixing the controllermap bug.

The "undo" feature of the controllermap tool does not work entirely correctly. It accepts the correct events for the correct steps, but due to an algorithmic error the "undone" mapping is not removed from the accumulated mapping string. As a result, the final string may contain duplicate entries.

The attached patch (against the development version in Mercurial) fixes the problem.
Comment 1 Gabriel Jacobo 2014-03-24 14:44:54 UTC
Fixed, thanks! https://hg.libsdl.org/SDL/rev/ce3c968f7340