Find just joysticks and gamepads (as opposed to, say, USB Audio devices), in
authorRyan C. Gordon <icculus@icculus.org>
Thu, 22 May 2003 06:41:54 +0000
changeset 62092080b127f82
parent 619 bf816ce70144
child 621 c3bb1270fa2b
Find just joysticks and gamepads (as opposed to, say, USB Audio devices), in
the MacOSX/Darwin joystick initialization code.
src/joystick/darwin/SDL_sysjoystick.c
     1.1 --- a/src/joystick/darwin/SDL_sysjoystick.c	Thu May 22 06:28:40 2003 +0000
     1.2 +++ b/src/joystick/darwin/SDL_sysjoystick.c	Thu May 22 06:41:54 2003 +0000
     1.3 @@ -647,9 +647,9 @@
     1.4  
     1.5  		/* Filter device list to non-keyboard/mouse stuff */ 
     1.6  		if ( device->usagePage == kHIDPage_GenericDesktop &&
     1.7 -		     (device->usage == kHIDUsage_GD_Keyboard ||
     1.8 -		      device->usage == kHIDUsage_GD_Mouse)) {
     1.9 -            
    1.10 +		     (device->usage != kHIDUsage_GD_Joystick ||
    1.11 +		      device->usage != kHIDUsage_GD_Gamepad)) {
    1.12 +
    1.13  			/* release memory for the device */
    1.14  			HIDDisposeDevice (&device);
    1.15  			DisposePtr((Ptr)device);