From c4348f44f747931ecc90456331f74e7e29be0546 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 13 Jul 2011 17:38:09 -0700 Subject: [PATCH] Linux: Search a smaller set of potential joystick axes. Newer kernels seem to report bogus axes in the higher ranges, for example with a standard PlayStation 3 controller plugged in via USB. --- src/joystick/linux/SDL_sysjoystick.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/joystick/linux/SDL_sysjoystick.c b/src/joystick/linux/SDL_sysjoystick.c index 4045909ba..51cf8a407 100644 --- a/src/joystick/linux/SDL_sysjoystick.c +++ b/src/joystick/linux/SDL_sysjoystick.c @@ -703,7 +703,7 @@ EV_ConfigJoystick(SDL_Joystick * joystick, int fd) ++joystick->nbuttons; } } - for (i = 0; i < ABS_MAX; ++i) { + for (i = 0; i < ABS_MISC; ++i) { /* Skip hats */ if (i == ABS_HAT0X) { i = ABS_HAT3Y;