Worked around bug with Sony PS Now PS3 controller where DirectInput polling will continue to return success after the controller is unplugged.
The code is now reliant on SDL_PrivateJoystickAdded() and SDL_PrivateJoystickRemoved() being called correctly when devices are added or removed on Windows
This commit is contained in:
parent
90f9ce1e41
commit
29023f51e8
17 changed files with 31 additions and 118 deletions
|
@ -59,6 +59,7 @@ struct _SDL_Joystick
|
|||
int nbuttons; /* Number of buttons on the joystick */
|
||||
Uint8 *buttons; /* Current button states */
|
||||
|
||||
SDL_bool attached;
|
||||
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 */
|
||||
|
@ -117,11 +118,6 @@ typedef struct _SDL_JoystickDriver
|
|||
*/
|
||||
int (*Open)(SDL_Joystick * joystick, int device_index);
|
||||
|
||||
/* Function to query if the joystick is currently attached
|
||||
* It returns SDL_TRUE if attached, SDL_FALSE otherwise.
|
||||
*/
|
||||
SDL_bool (*IsAttached)(SDL_Joystick * joystick);
|
||||
|
||||
/* Rumble functionality */
|
||||
int (*Rumble)(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue