From 201868156e90790213935b8d75de9d5b4052ac8e Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 19 Feb 2015 23:52:10 -0500 Subject: [PATCH] Mac OS X: Better way to stop duplicate joystick reports (thanks, Kyungdahm!). Fixes Bugzilla #2822. --- src/joystick/darwin/SDL_sysjoystick.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/joystick/darwin/SDL_sysjoystick.c b/src/joystick/darwin/SDL_sysjoystick.c index 0518cc75b935e..ac40e322db75f 100644 --- a/src/joystick/darwin/SDL_sysjoystick.c +++ b/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. */