SDL 3.0
SDL_JoyHatEvent Struct Reference

#include <SDL_events.h>

Data Fields

SDL_EventType type
 
Uint32 reserved
 
Uint64 timestamp
 
SDL_JoystickID which
 
Uint8 hat
 
Uint8 value
 
Uint8 padding1
 
Uint8 padding2
 

Detailed Description

Joystick hat position change event structure (event.jhat.*)

Since
This struct is available since SDL 3.0.0.

Definition at line 519 of file SDL_events.h.

Field Documentation

◆ hat

Uint8 SDL_JoyHatEvent::hat

The joystick hat index

Definition at line 525 of file SDL_events.h.

◆ padding1

Uint8 SDL_JoyHatEvent::padding1

Definition at line 533 of file SDL_events.h.

◆ padding2

Uint8 SDL_JoyHatEvent::padding2

Definition at line 534 of file SDL_events.h.

◆ reserved

Uint32 SDL_JoyHatEvent::reserved

Definition at line 522 of file SDL_events.h.

◆ timestamp

Uint64 SDL_JoyHatEvent::timestamp

In nanoseconds, populated using SDL_GetTicksNS()

Definition at line 523 of file SDL_events.h.

◆ type

SDL_EventType SDL_JoyHatEvent::type

SDL_EVENT_JOYSTICK_HAT_MOTION

Definition at line 521 of file SDL_events.h.

◆ value

Uint8 SDL_JoyHatEvent::value

The hat position value.

See also
SDL_HAT_LEFTUP SDL_HAT_UP SDL_HAT_RIGHTUP
SDL_HAT_LEFT SDL_HAT_CENTERED SDL_HAT_RIGHT
SDL_HAT_LEFTDOWN SDL_HAT_DOWN SDL_HAT_RIGHTDOWN

Note that zero means the POV is centered.

Definition at line 526 of file SDL_events.h.

◆ which

SDL_JoystickID SDL_JoyHatEvent::which

The joystick instance id

Definition at line 524 of file SDL_events.h.


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