mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
Linux joystick: Look at entire axis namespace for controls (thanks, "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.
This commit is contained in:
parent
523064592a
commit
f99d6e1df8
@ -492,7 +492,7 @@ ConfigJoystick(SDL_Joystick * joystick, int fd)
|
|||||||
++joystick->nbuttons;
|
++joystick->nbuttons;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (i = 0; i < ABS_MISC; ++i) {
|
for (i = 0; i < ABS_MAX; ++i) {
|
||||||
/* Skip hats */
|
/* Skip hats */
|
||||||
if (i == ABS_HAT0X) {
|
if (i == ABS_HAT0X) {
|
||||||
i = ABS_HAT3Y;
|
i = ABS_HAT3Y;
|
||||||
@ -753,10 +753,6 @@ HandleInputEvents(SDL_Joystick * joystick)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EV_ABS:
|
case EV_ABS:
|
||||||
if (code >= ABS_MISC) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case ABS_HAT0X:
|
case ABS_HAT0X:
|
||||||
case ABS_HAT0Y:
|
case ABS_HAT0Y:
|
||||||
|
Loading…
Reference in New Issue
Block a user