Mac: Run the CFRunLoop in joystick mode during SDL_SYS_JoystickNeedsPolling().
This fixes hotplugging failing to detect devices.
1.1 --- a/src/joystick/darwin/SDL_sysjoystick.c Fri Jun 13 10:50:24 2014 -0700
1.2 +++ b/src/joystick/darwin/SDL_sysjoystick.c Fri Jun 13 14:52:26 2014 -0400
1.3 @@ -604,7 +604,9 @@
1.4 SDL_bool
1.5 SDL_SYS_JoystickNeedsPolling()
1.6 {
1.7 - // BUGBUG - only works if someone else is pumping the CFRunLoop...
1.8 + while (CFRunLoopRunInMode(SDL_JOYSTICK_RUNLOOP_MODE,0,TRUE) == kCFRunLoopRunHandledSource) {
1.9 + /* no-op. Pending callbacks will fire in CFRunLoopRunInMode(). */
1.10 + }
1.11 return s_bDeviceAdded || s_bDeviceRemoved;
1.12 }
1.13