God, this is the never-ending patch. Another USB joystick detection fix for

MacOSX/Darwin.  --ryan.
This commit is contained in:
Ryan C. Gordon
2003-05-25 02:17:52 +00:00
parent 3ee913b76a
commit 980a4f6c5c

View File

@@ -646,9 +646,9 @@ int SDL_SYS_JoystickInit(void)
// 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);