Skip to content

Commit

Permalink
Mac OS X: Better way to stop duplicate joystick reports (thanks, Kyun…
Browse files Browse the repository at this point in the history
…gdahm!).

Fixes Bugzilla #2822.
  • Loading branch information
icculus committed Feb 20, 2015
1 parent 33b9d9a commit 2018681
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/joystick/darwin/SDL_sysjoystick.c
Expand Up @@ -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. */
Expand Down

0 comments on commit 2018681

Please sign in to comment.