Generalized the handling of instantaneous guide button presses so there's a minimum of 100 ms between guide button press and release.

This happens with at least the following controllers: All Apple MFI controllers, ASUS Gamepad, XiaoMi Bluetooth Controller
This commit is contained in:
Sam Lantinga 2018-03-19 14:42:51 -07:00
parent d529b001bc
commit 8e062f6925
6 changed files with 46 additions and 14 deletions

View file

@ -874,6 +874,10 @@ SDL_JoystickUpdate(void)
for (joystick = SDL_joysticks; joystick; joystick = joystick->next) {
SDL_SYS_JoystickUpdate(joystick);
if (joystick->delayed_guide_button) {
SDL_GameControllerHandleDelayedGuideButton(joystick);
}
if (joystick->force_recentering) {
int i;