joystick: Remove force_centering flag; we handle this on disconnect now.
parent
fba081e489
commit
8c165adde7
|
@ -2139,7 +2139,7 @@ SDL_PrivateGameControllerButton(SDL_GameController * gamecontroller, SDL_GameCon
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!SDL_TICKS_PASSED(now, gamecontroller->guide_button_down+SDL_MINIMUM_GUIDE_BUTTON_DELAY_MS) && !gamecontroller->joystick->force_recentering) {
|
if (!SDL_TICKS_PASSED(now, gamecontroller->guide_button_down+SDL_MINIMUM_GUIDE_BUTTON_DELAY_MS)) {
|
||||||
gamecontroller->joystick->delayed_guide_button = SDL_TRUE;
|
gamecontroller->joystick->delayed_guide_button = SDL_TRUE;
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1371,12 +1371,6 @@ SDL_JoystickUpdate(void)
|
||||||
}
|
}
|
||||||
SDL_UnlockJoysticks();
|
SDL_UnlockJoysticks();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* !!! FIXME: only one thing sets force_recentering now (the Darwin code), see if that can be removed. */
|
|
||||||
if (joystick->force_recentering) {
|
|
||||||
SDL_PrivateJoystickForceRecentering(joystick);
|
|
||||||
joystick->force_recentering = SDL_FALSE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_LockJoysticks();
|
SDL_LockJoysticks();
|
||||||
|
|
|
@ -67,7 +67,6 @@ struct _SDL_Joystick
|
||||||
SDL_bool attached;
|
SDL_bool attached;
|
||||||
SDL_bool is_game_controller;
|
SDL_bool is_game_controller;
|
||||||
SDL_bool delayed_guide_button; /* SDL_TRUE if this device has the guide button event delayed */
|
SDL_bool delayed_guide_button; /* SDL_TRUE if this device has the guide button event delayed */
|
||||||
SDL_bool force_recentering; /* SDL_TRUE if this device needs to have its state reset to 0 */
|
|
||||||
SDL_JoystickPowerLevel epowerlevel; /* power level of this joystick, SDL_JOYSTICK_POWER_UNKNOWN if not supported */
|
SDL_JoystickPowerLevel epowerlevel; /* power level of this joystick, SDL_JOYSTICK_POWER_UNKNOWN if not supported */
|
||||||
struct _SDL_JoystickDriver *driver;
|
struct _SDL_JoystickDriver *driver;
|
||||||
|
|
||||||
|
|
|
@ -936,7 +936,6 @@ DARWIN_JoystickUpdate(SDL_Joystick * joystick)
|
||||||
|
|
||||||
if (device->removed) { /* device was unplugged; ignore it. */
|
if (device->removed) { /* device was unplugged; ignore it. */
|
||||||
if (joystick->hwdata) {
|
if (joystick->hwdata) {
|
||||||
joystick->force_recentering = SDL_TRUE;
|
|
||||||
joystick->hwdata = NULL;
|
joystick->hwdata = NULL;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue