Skip to content
Permalink
Browse files

Mac OS X: Better way to stop duplicate joystick reports (thanks, Kyun…

…gdahm!).

Fixes Bugzilla #2822.
  • Loading branch information
icculus committed Feb 20, 2015
1 parent 33b9d9a commit 201868156e90790213935b8d75de9d5b4052ac8e
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/joystick/darwin/SDL_sysjoystick.c
@@ -446,9 +446,9 @@ ConfigHIDManager(CFArrayRef matchingArray)
return SDL_FALSE;
}

IOHIDManagerSetDeviceMatchingMultiple(hidman, matchingArray);
IOHIDManagerRegisterDeviceMatchingCallback(hidman, JoystickDeviceWasAddedCallback, NULL);
IOHIDManagerScheduleWithRunLoop(hidman, runloop, SDL_JOYSTICK_RUNLOOP_MODE);
IOHIDManagerSetDeviceMatchingMultiple(hidman, matchingArray);

while (CFRunLoopRunInMode(SDL_JOYSTICK_RUNLOOP_MODE,0,TRUE) == kCFRunLoopRunHandledSource) {
/* no-op. Callback fires once per existing device. */

0 comments on commit 2018681

Please sign in to comment.