Skip to content

Commit

Permalink
Linux joystick: Look at entire axis namespace for controls (thanks, "…
Browse files Browse the repository at this point in the history
…spaz16"!).

This apparently has fallout: the PS4 (and maybe PS3?) controllers apparently
report some bogus axes, but it won't change the axes we currently expect, and
thus the game controller config string is still stable.

Fixes Bugzilla #2719.
  • Loading branch information
icculus committed May 26, 2015
1 parent 5230645 commit f99d6e1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/joystick/linux/SDL_sysjoystick.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit f99d6e1

Please sign in to comment.