diff options
author | Sam Lantinga <slouken@libsdl.org> | 2020-11-13 18:01:29 -0800 |
---|---|---|
committer | Sam Lantinga <slouken@libsdl.org> | 2020-11-13 18:01:29 -0800 |
commit | f38ac2e419dfb124f0f31a86a13f5fc9e07874aa (patch) | |
tree | 937866fbd899f2f9b91c249a7d369ac1fb2a2a04 /src/joystick/SDL_sysjoystick.h | |
parent | fa972b544407720daa36cc2dcd45fcec1682b044 (diff) | |
download | sdl-f38ac2e419dfb124f0f31a86a13f5fc9e07874aa.tar.gz |
Added support for the touchpad on PS4 and PS5 controllers
Diffstat (limited to 'src/joystick/SDL_sysjoystick.h')
-rw-r--r-- | src/joystick/SDL_sysjoystick.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/joystick/SDL_sysjoystick.h b/src/joystick/SDL_sysjoystick.h index 5cf10a719..02dc71ea2 100644 --- a/src/joystick/SDL_sysjoystick.h +++ b/src/joystick/SDL_sysjoystick.h @@ -39,6 +39,20 @@ typedef struct _SDL_JoystickAxisInfo SDL_bool sent_initial_value; /* Whether we've sent the initial axis value */ } SDL_JoystickAxisInfo; +typedef struct _SDL_JoystickTouchpadFingerInfo +{ + Uint8 state; + float x; + float y; + float pressure; +} SDL_JoystickTouchpadFingerInfo; + +typedef struct _SDL_JoystickTouchpadInfo +{ + int nfingers; + SDL_JoystickTouchpadFingerInfo *fingers; +} SDL_JoystickTouchpadInfo; + struct _SDL_Joystick { SDL_JoystickID instance_id; /* Device instance, monotonically increasing from 0 */ @@ -60,6 +74,9 @@ struct _SDL_Joystick int nbuttons; /* Number of buttons on the joystick */ Uint8 *buttons; /* Current button states */ + int ntouchpads; /* Number of touchpads on the joystick */ + SDL_JoystickTouchpadInfo *touchpads; /* Current touchpad states */ + Uint16 low_frequency_rumble; Uint16 high_frequency_rumble; Uint32 rumble_expiration; |