SDL Wiki

SDL_JoyHatEvent

A structure that contains joystick hat position change event information.

Data Fields

Uint32

type

SDL_JOYHATMOTION

Uint32

timestamp

timestamp of the event

SDL_JoystickID

which

the instance id of the joystick that reported the event

Uint8

hat

the index of the hat that changed

Uint8

value

the new position of the hat; see Remarks for details

Remarks

SDL_JoyHatEvent is a member of the SDL_Event union and is used when an event of type SDL_JOYHATMOTION is reported. You would access it through the event's jhat field.

An SDL_JOYHATMOTION event occurs whenever a user moves a hat on the joystick.

value may be one of the following:

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.

SDL_EventType
SDL_Event
SDL_JoyAxisEvent
SDL_JoyBallEvent
SDL_JoyButtonEvent
SDL_JoystickEventState
SDL_JoystickGetHat

CategoryStruct, CategoryEvents


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.