Mac OS X: Better way to stop duplicate joystick reports (thanks, Kyungdahm!).
authorRyan C. Gordon <icculus@icculus.org>
Thu, 19 Feb 2015 23:52:10 -0500
changeset 9370795d4866e4db
parent 9369 9bb7a7c0a66e
child 9371 375799828431
Mac OS X: Better way to stop duplicate joystick reports (thanks, Kyungdahm!).

Fixes Bugzilla #2822.
src/joystick/darwin/SDL_sysjoystick.c
     1.1 --- a/src/joystick/darwin/SDL_sysjoystick.c	Thu Feb 19 21:51:13 2015 -0500
     1.2 +++ b/src/joystick/darwin/SDL_sysjoystick.c	Thu Feb 19 23:52:10 2015 -0500
     1.3 @@ -446,9 +446,9 @@
     1.4          return SDL_FALSE;
     1.5      }
     1.6  
     1.7 +    IOHIDManagerSetDeviceMatchingMultiple(hidman, matchingArray);
     1.8      IOHIDManagerRegisterDeviceMatchingCallback(hidman, JoystickDeviceWasAddedCallback, NULL);
     1.9      IOHIDManagerScheduleWithRunLoop(hidman, runloop, SDL_JOYSTICK_RUNLOOP_MODE);
    1.10 -    IOHIDManagerSetDeviceMatchingMultiple(hidman, matchingArray);
    1.11  
    1.12      while (CFRunLoopRunInMode(SDL_JOYSTICK_RUNLOOP_MODE,0,TRUE) == kCFRunLoopRunHandledSource) {
    1.13          /* no-op. Callback fires once per existing device. */