Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linux/SDL_sysjoystick.c: Fix bug #3193:
Protect against any axis that isn't reported by EVIOCGBIT but still sends EV_ABS events; patch from <maxxus@gmail.com>. Original issue and description: The Dualshock 3's motion sensors don't seem to be reported by the call to EVIOCGBIT but they still send EV_ABS events. Because they're not reported by EVIOCGBIT they're not assigned a proper axis ids and the default of 0 is used, which is the valid id for the left analog sticks left/right axis. The attached patch sets the default axis id to ABS_MAX and then checks the axis id before performing the update. This will protect against EV_ABS events for axes that aren't reported or handled correctly.
- Loading branch information