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

@ -63,6 +63,7 @@ struct _SDL_Joystick
int ref_count; /* Reference count for multiple opens */
SDL_bool is_game_controller;
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 */
struct _SDL_Joystick *next; /* pointer to next joystick we have allocated */