Linux: Search a smaller set of potential joystick axes. SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Wed, 13 Jul 2011 17:36:29 -0700
branchSDL-1.2
changeset 556162269926f506
parent 5560 98ae43d3d2f4
child 5565 4225f09eb8cb
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
     1.1 --- a/src/joystick/linux/SDL_sysjoystick.c	Thu Jul 07 11:50:30 2011 -0700
     1.2 +++ b/src/joystick/linux/SDL_sysjoystick.c	Wed Jul 13 17:36:29 2011 -0700
     1.3 @@ -703,7 +703,7 @@
     1.4  				++joystick->nbuttons;
     1.5  			}
     1.6  		}
     1.7 -		for ( i=0; i<ABS_MAX; ++i ) {
     1.8 +		for ( i=0; i<ABS_MISC; ++i ) {
     1.9  			/* Skip hats */
    1.10  			if ( i == ABS_HAT0X ) {
    1.11  				i = ABS_HAT3Y;