Mac OS X joystick support: don't ignore kHIDUsage_GD_MultiAxisController SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Sun, 18 Mar 2007 22:37:10 +0000
branchSDL-1.2
changeset 39247156c3b5536b
parent 3923 0dd8bdf173e2
child 3925 78ff7d10dbb5
Mac OS X joystick support: don't ignore kHIDUsage_GD_MultiAxisController
devices, since they are probably joysticks, or joystick-like things.

See 3Dconnexion's SpaceNavigator for an example of such a device:
http://www.3dconnexion.com/products/3a1d.php

Thanks to Laurence Passmore for the fix.
src/joystick/darwin/SDL_sysjoystick.c
     1.1 --- a/src/joystick/darwin/SDL_sysjoystick.c	Wed Mar 14 01:09:24 2007 +0000
     1.2 +++ b/src/joystick/darwin/SDL_sysjoystick.c	Sun Mar 18 22:37:10 2007 +0000
     1.3 @@ -652,7 +652,8 @@
     1.4  		/* Filter device list to non-keyboard/mouse stuff */ 
     1.5  		if ( (device->usagePage != kHIDPage_GenericDesktop) ||
     1.6  		     ((device->usage != kHIDUsage_GD_Joystick &&
     1.7 -		      device->usage != kHIDUsage_GD_GamePad)) ) {
     1.8 +		      device->usage != kHIDUsage_GD_GamePad &&
     1.9 +		      device->usage != kHIDUsage_GD_MultiAxisController)) ) {
    1.10  
    1.11  			/* release memory for the device */
    1.12  			HIDDisposeDevice (&device);