src/joystick/darwin/SDL_sysjoystick.c
changeset 623 477917048b91
parent 622 e6d751de784a
child 629 3fa401bb4bb5
equal deleted inserted replaced
622:e6d751de784a 623:477917048b91
   644 		result = IOObjectRelease (ioHIDDeviceObject);
   644 		result = IOObjectRelease (ioHIDDeviceObject);
   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_Joystick &&
   650 		     ((device->usage != kHIDUsage_GD_Joystick &&
   651 		      device->usage != kHIDUsage_GD_GamePad)) {
   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;