src/joystick/darwin/SDL_sysjoystick.c
changeset 2120 2c835d58faad
parent 2110 21942f552734
child 2287 15a242fca6c4
equal deleted inserted replaced
2119:9341a884a4d9 2120:2c835d58faad
   691 /*		if (KERN_SUCCESS != result)
   691 /*		if (KERN_SUCCESS != result)
   692 			HIDReportErrorNum ("IOObjectRelease error with ioHIDDeviceObject.", result);
   692 			HIDReportErrorNum ("IOObjectRelease error with ioHIDDeviceObject.", result);
   693 */
   693 */
   694 
   694 
   695         /* Filter device list to non-keyboard/mouse stuff */
   695         /* Filter device list to non-keyboard/mouse stuff */
   696         if ( (device->usagePage != kHIDPage_GenericDesktop) ||
   696         if ((device->usagePage != kHIDPage_GenericDesktop) ||
   697              ((device->usage != kHIDUsage_GD_Joystick &&
   697             ((device->usage != kHIDUsage_GD_Joystick &&
   698                device->usage != kHIDUsage_GD_GamePad &&
   698               device->usage != kHIDUsage_GD_GamePad &&
   699                device->usage != kHIDUsage_GD_MultiAxisController)) ) {
   699               device->usage != kHIDUsage_GD_MultiAxisController))) {
   700 
   700 
   701             /* release memory for the device */
   701             /* release memory for the device */
   702             HIDDisposeDevice(&device);
   702             HIDDisposeDevice(&device);
   703             DisposePtr((Ptr) device);
   703             DisposePtr((Ptr) device);
   704             continue;
   704             continue;