diff --git a/src/joystick/linux/SDL_sysjoystick.c b/src/joystick/linux/SDL_sysjoystick.c index da5ab2a77..c6f7911ca 100644 --- a/src/joystick/linux/SDL_sysjoystick.c +++ b/src/joystick/linux/SDL_sysjoystick.c @@ -492,7 +492,7 @@ ConfigJoystick(SDL_Joystick * joystick, int fd) ++joystick->nbuttons; } } - for (i = 0; i < ABS_MISC; ++i) { + for (i = 0; i < ABS_MAX; ++i) { /* Skip hats */ if (i == ABS_HAT0X) { i = ABS_HAT3Y; @@ -753,10 +753,6 @@ HandleInputEvents(SDL_Joystick * joystick) } break; case EV_ABS: - if (code >= ABS_MISC) { - break; - } - switch (code) { case ABS_HAT0X: case ABS_HAT0Y: