God, this is the never-ending patch. Another USB joystick detection fix for
authorRyan C. Gordon <icculus@icculus.org>
Sun, 25 May 2003 02:17:52 +0000
changeset 623 477917048b91
parent 622 e6d751de784a
child 624 fb78cadbfeb8
God, this is the never-ending patch. Another USB joystick detection fix for MacOSX/Darwin. --ryan.
src/joystick/darwin/SDL_sysjoystick.c
--- a/src/joystick/darwin/SDL_sysjoystick.c	Thu May 22 20:42:37 2003 +0000
+++ b/src/joystick/darwin/SDL_sysjoystick.c	Sun May 25 02:17:52 2003 +0000
@@ -646,9 +646,9 @@
 //			HIDReportErrorNum ("IOObjectRelease error with ioHIDDeviceObject.", result);
 
 		/* Filter device list to non-keyboard/mouse stuff */ 
-		if ( device->usagePage == kHIDPage_GenericDesktop &&
-		     (device->usage != kHIDUsage_GD_Joystick &&
-		      device->usage != kHIDUsage_GD_GamePad)) {
+		if ( (device->usagePage != kHIDPage_GenericDesktop) ||
+		     ((device->usage != kHIDUsage_GD_Joystick &&
+		      device->usage != kHIDUsage_GD_GamePad)) ) {
 
 			/* release memory for the device */
 			HIDDisposeDevice (&device);