# HG changeset patch # User Ryan C. Gordon # Date 1053585714 0 # Node ID 92080b127f828ffd13a3f41402873d9e0e39beda # Parent bf816ce70144c1689a200c006b9003f9d352bc75 Find just joysticks and gamepads (as opposed to, say, USB Audio devices), in the MacOSX/Darwin joystick initialization code. diff -r bf816ce70144 -r 92080b127f82 src/joystick/darwin/SDL_sysjoystick.c --- a/src/joystick/darwin/SDL_sysjoystick.c Thu May 22 06:28:40 2003 +0000 +++ b/src/joystick/darwin/SDL_sysjoystick.c Thu May 22 06:41:54 2003 +0000 @@ -647,9 +647,9 @@ /* Filter device list to non-keyboard/mouse stuff */ if ( device->usagePage == kHIDPage_GenericDesktop && - (device->usage == kHIDUsage_GD_Keyboard || - device->usage == kHIDUsage_GD_Mouse)) { - + (device->usage != kHIDUsage_GD_Joystick || + device->usage != kHIDUsage_GD_Gamepad)) { + /* release memory for the device */ HIDDisposeDevice (&device); DisposePtr((Ptr)device);