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 3924 7156c3b5536b
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
--- a/src/joystick/darwin/SDL_sysjoystick.c	Wed Mar 14 01:09:24 2007 +0000
+++ b/src/joystick/darwin/SDL_sysjoystick.c	Sun Mar 18 22:37:10 2007 +0000
@@ -652,7 +652,8 @@
 		/* Filter device list to non-keyboard/mouse stuff */ 
 		if ( (device->usagePage != kHIDPage_GenericDesktop) ||
 		     ((device->usage != kHIDUsage_GD_Joystick &&
-		      device->usage != kHIDUsage_GD_GamePad)) ) {
+		      device->usage != kHIDUsage_GD_GamePad &&
+		      device->usage != kHIDUsage_GD_MultiAxisController)) ) {
 
 			/* release memory for the device */
 			HIDDisposeDevice (&device);