mirror of
https://github.com/encounter/SDL.git
synced 2025-12-11 22:44:17 +00:00
Removed SDL_SYS_JoystickNeedsPolling().
It was simpler to just have the polling (actually: hotplug detection) functions return immediately if it's not an appropriate time to poll. Note that previously, if any joystick/controller was opened, we would poll every time anyhow, skipping this function.
This commit is contained in:
@@ -83,19 +83,6 @@ static struct
|
||||
} SDL_EventQ = { NULL, SDL_TRUE };
|
||||
|
||||
|
||||
static SDL_INLINE SDL_bool
|
||||
SDL_ShouldPollJoystick()
|
||||
{
|
||||
#if !SDL_JOYSTICK_DISABLED
|
||||
if ((!SDL_disabled_events[SDL_JOYAXISMOTION >> 8] ||
|
||||
SDL_JoystickEventState(SDL_QUERY)) &&
|
||||
SDL_PrivateJoystickNeedsPolling()) {
|
||||
return SDL_TRUE;
|
||||
}
|
||||
#endif
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
/* Public functions */
|
||||
|
||||
void
|
||||
@@ -403,7 +390,7 @@ SDL_PumpEvents(void)
|
||||
}
|
||||
#if !SDL_JOYSTICK_DISABLED
|
||||
/* Check for joystick state change */
|
||||
if (SDL_ShouldPollJoystick()) {
|
||||
if ((!SDL_disabled_events[SDL_JOYAXISMOTION >> 8] || SDL_JoystickEventState(SDL_QUERY))) {
|
||||
SDL_JoystickUpdate();
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user