Gamepad button event structure (event.gbutton.*)
Defined in <SDL3/SDL_events.h>
typedef struct SDL_GamepadButtonEvent
{/**< SDL_EVENT_GAMEPAD_BUTTON_DOWN or SDL_EVENT_GAMEPAD_BUTTON_UP */
SDL_EventType type;
Uint32 reserved;/**< In nanoseconds, populated using SDL_GetTicksNS() */
Uint64 timestamp; /**< The joystick instance id */
SDL_JoystickID which; /**< The gamepad button (SDL_GamepadButton) */
Uint8 button; bool down; /**< true if the button is pressed */
Uint8 padding1;
Uint8 padding2; } SDL_GamepadButtonEvent;
This struct is available since SDL 3.1.3.