Skip to content

Commit

Permalink
Linux evdev: ignore joystick axis events if they aren't in a sane range.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jun 3, 2012
1 parent 52d9fb5 commit ab99cc8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/joystick/linux/SDL_sysjoystick.c
Expand Up @@ -1106,6 +1106,9 @@ static __inline__ void EV_HandleEvents(SDL_Joystick *joystick)
}
break;
case EV_ABS:
if (code > ABS_MISC) {
break;
}
switch (code) {
case ABS_HAT0X:
case ABS_HAT0Y:
Expand Down

0 comments on commit ab99cc8

Please sign in to comment.