SDL 3.0
SDL_JoyButtonEvent 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

Joystick button event structure (event.jbutton.*)

Since
This struct is available since SDL 3.2.0.

Definition at line 574 of file SDL_events.h.

Field Documentation

◆ button

Uint8 SDL_JoyButtonEvent::button

The joystick button index

Definition at line 580 of file SDL_events.h.

◆ down

bool SDL_JoyButtonEvent::down

true if the button is pressed

Definition at line 581 of file SDL_events.h.

◆ padding1

Uint8 SDL_JoyButtonEvent::padding1

Definition at line 582 of file SDL_events.h.

◆ padding2

Uint8 SDL_JoyButtonEvent::padding2

Definition at line 583 of file SDL_events.h.

◆ reserved

Uint32 SDL_JoyButtonEvent::reserved

Definition at line 577 of file SDL_events.h.

◆ timestamp

Uint64 SDL_JoyButtonEvent::timestamp

In nanoseconds, populated using SDL_GetTicksNS()

Definition at line 578 of file SDL_events.h.

◆ type

SDL_EventType SDL_JoyButtonEvent::type

SDL_EVENT_JOYSTICK_BUTTON_DOWN or SDL_EVENT_JOYSTICK_BUTTON_UP

Definition at line 576 of file SDL_events.h.

◆ which

SDL_JoystickID SDL_JoyButtonEvent::which

The joystick instance id

Definition at line 579 of file SDL_events.h.


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