Fix from 1.2 branch: ignore bogus Linux evdev joystick axes.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 03 Jun 2012 05:05:34 -0400
changeset 6326 57001e845b72
parent 6323 d3fa10b2d16e
child 6327 7c37af802e63
Fix from 1.2 branch: ignore bogus Linux evdev joystick axes.
src/joystick/linux/SDL_sysjoystick.c
--- a/src/joystick/linux/SDL_sysjoystick.c	Fri Jun 01 20:31:50 2012 -0400
+++ b/src/joystick/linux/SDL_sysjoystick.c	Sun Jun 03 05:05:34 2012 -0400
@@ -1117,6 +1117,10 @@
                 }
                 break;
             case EV_ABS:
+                if (code >= ABS_MISC) {
+                    break;
+                }
+
                 switch (code) {
                 case ABS_HAT0X:
                 case ABS_HAT0Y: