Skip to content

Commit

Permalink
Mac: Run the CFRunLoop in joystick mode during SDL_SYS_JoystickNeedsP…
Browse files Browse the repository at this point in the history
…olling().

This fixes hotplugging failing to detect devices.
  • Loading branch information
icculus committed Jun 13, 2014
1 parent 8c2c744 commit 9e5504f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/joystick/darwin/SDL_sysjoystick.c
Expand Up @@ -604,7 +604,9 @@ SDL_SYS_JoystickDetect()
SDL_bool
SDL_SYS_JoystickNeedsPolling()
{
// BUGBUG - only works if someone else is pumping the CFRunLoop...
while (CFRunLoopRunInMode(SDL_JOYSTICK_RUNLOOP_MODE,0,TRUE) == kCFRunLoopRunHandledSource) {
/* no-op. Pending callbacks will fire in CFRunLoopRunInMode(). */
}
return s_bDeviceAdded || s_bDeviceRemoved;
}

Expand Down

0 comments on commit 9e5504f

Please sign in to comment.