Some controllers are doubled on mac, how is this handled? |
morgan1879
|
I did resolve this by adding code to SDL in joystick/Darwin/SDL_sysjoystick.c:
Within GetDeviceInfo(), after this block: if ((pDevice->usage != kHIDUsage_GD_Joystick && pDevice->usage != kHIDUsage_GD_GamePad && pDevice->usage != kHIDUsage_GD_MultiAxisController)) { return SDL_FALSE; /* Filter device list to non-keyboard/mouse stuff */ } I placed this code to fix the problem: recDevice *curdevice = gpDeviceList; while (curdevice) { if ( curdevice->deviceRef == hidDevice) return SDL_FALSE; curdevice = curdevice->pNext; }; The better solution would be find out why IOKit is sending the specific controllers twice. |
|||||||||||
|
mbabuskov
|
Hi, I have the same problem with 360 controller. Are you sure this fix will work if you have two identical controllers? I don't have two 360 controllers to test but is "deviceRef" going to be unique? P.S. If I unplug the controller while the game is running, it reports two controller being removed, and if I plug it back, it only reports one properly. |
|||||||||||||
|
Ball
|
Is this somehow related to why SDL apps see two PS3 controllers even though I only have one paired? I've been trying to delete all my bluetooth prefs, but now I think this is a bug in SDL.
If so, this bug is what is preventing me from being able to use Mupen64. Also, in SDl apps only the second PS3 controller works. the first one does nothing. |
|||||||||||
|