Update the sensors before the joysticks so the gamepad code gets fresh sensor readings
This commit is contained in:
@@ -854,13 +854,6 @@ static void SDL_PumpEventsInternal(SDL_bool push_sentinel)
|
|||||||
_this->PumpEvents(_this);
|
_this->PumpEvents(_this);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SDL_JOYSTICK_DISABLED
|
|
||||||
/* Check for joystick state change */
|
|
||||||
if (SDL_update_joysticks) {
|
|
||||||
SDL_UpdateJoysticks();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SDL_SENSOR_DISABLED
|
#ifndef SDL_SENSOR_DISABLED
|
||||||
/* Check for sensor state change */
|
/* Check for sensor state change */
|
||||||
if (SDL_update_sensors) {
|
if (SDL_update_sensors) {
|
||||||
@@ -868,6 +861,13 @@ static void SDL_PumpEventsInternal(SDL_bool push_sentinel)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef SDL_JOYSTICK_DISABLED
|
||||||
|
/* Check for joystick state change */
|
||||||
|
if (SDL_update_joysticks) {
|
||||||
|
SDL_UpdateJoysticks();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
SDL_SendPendingSignalEvents(); /* in case we had a signal handler fire, etc. */
|
SDL_SendPendingSignalEvents(); /* in case we had a signal handler fire, etc. */
|
||||||
|
|
||||||
if (push_sentinel && SDL_EventEnabled(SDL_EVENT_POLL_SENTINEL)) {
|
if (push_sentinel && SDL_EventEnabled(SDL_EVENT_POLL_SENTINEL)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user