SDL 3.0
SDL_GamepadButtonEvent Struct Reference

#include <SDL_events.h>

Data Fields

SDL_EventType type
 
Uint32 reserved
 
Uint64 timestamp
 
SDL_JoystickID which
 
Uint8 button
 
bool down
 
Uint8 padding1
 
Uint8 padding2
 

Detailed Description

Gamepad button event structure (event.gbutton.*)

Since
This struct is available since SDL 3.1.3.

Definition at line 633 of file SDL_events.h.

Field Documentation

◆ button

Uint8 SDL_GamepadButtonEvent::button

The gamepad button (SDL_GamepadButton)

Definition at line 639 of file SDL_events.h.

◆ down

bool SDL_GamepadButtonEvent::down

true if the button is pressed

Definition at line 640 of file SDL_events.h.

◆ padding1

Uint8 SDL_GamepadButtonEvent::padding1

Definition at line 641 of file SDL_events.h.

◆ padding2

Uint8 SDL_GamepadButtonEvent::padding2

Definition at line 642 of file SDL_events.h.

◆ reserved

Uint32 SDL_GamepadButtonEvent::reserved

Definition at line 636 of file SDL_events.h.

◆ timestamp

Uint64 SDL_GamepadButtonEvent::timestamp

In nanoseconds, populated using SDL_GetTicksNS()

Definition at line 637 of file SDL_events.h.

◆ type

SDL_EventType SDL_GamepadButtonEvent::type

SDL_EVENT_GAMEPAD_BUTTON_DOWN or SDL_EVENT_GAMEPAD_BUTTON_UP

Definition at line 635 of file SDL_events.h.

◆ which

SDL_JoystickID SDL_GamepadButtonEvent::which

The joystick instance id

Definition at line 638 of file SDL_events.h.


The documentation for this struct was generated from the following file: