src/joystick/darwin/SDL_sysjoystick.c
changeset 620 92080b127f82
parent 617 86e0385b8f96
child 621 c3bb1270fa2b
equal deleted inserted replaced
619:bf816ce70144 620:92080b127f82
   645 //		if (KERN_SUCCESS != result)
   645 //		if (KERN_SUCCESS != result)
   646 //			HIDReportErrorNum ("IOObjectRelease error with ioHIDDeviceObject.", result);
   646 //			HIDReportErrorNum ("IOObjectRelease error with ioHIDDeviceObject.", result);
   647 
   647 
   648 		/* Filter device list to non-keyboard/mouse stuff */ 
   648 		/* Filter device list to non-keyboard/mouse stuff */ 
   649 		if ( device->usagePage == kHIDPage_GenericDesktop &&
   649 		if ( device->usagePage == kHIDPage_GenericDesktop &&
   650 		     (device->usage == kHIDUsage_GD_Keyboard ||
   650 		     (device->usage != kHIDUsage_GD_Joystick ||
   651 		      device->usage == kHIDUsage_GD_Mouse)) {
   651 		      device->usage != kHIDUsage_GD_Gamepad)) {
   652             
   652 
   653 			/* release memory for the device */
   653 			/* release memory for the device */
   654 			HIDDisposeDevice (&device);
   654 			HIDDisposeDevice (&device);
   655 			DisposePtr((Ptr)device);
   655 			DisposePtr((Ptr)device);
   656 			continue;
   656 			continue;
   657 		}
   657 		}