Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds

This commit is contained in:
Sam Lantinga 2012-11-26 16:37:54 -08:00
parent 2a4a81ad63
commit 34b88dfaae
30 changed files with 4191 additions and 580 deletions

View file

@ -70,7 +70,7 @@ static __inline__ SDL_bool
SDL_ShouldPollJoystick()
{
#if !SDL_JOYSTICK_DISABLED
if (SDL_numjoysticks &&
if (SDL_PrivateJoystickNeedsPolling() &&
(!SDL_disabled_events[SDL_JOYAXISMOTION >> 8] ||
SDL_JoystickEventState(SDL_QUERY))) {
return SDL_TRUE;