Wiki Page Content

Differences between revisions 13 and 14
Revision 13 as of 2013-06-16 09:26:22
Size: 1387
Comment: Updated types to match SDL_events.h.
Revision 14 as of 2013-09-05 20:27:31
Size: 1648
Comment: Updated structure.
Deletions are marked like this. Additions are marked like this.
Line 11: Line 11:
||Uint32||'''timestamp'''||timestamp of the event||
Line 14: Line 15:
||<style="color: #808080;">Uint8||<style="color: #808080;">'''padding1'''||<style="color: #808080;">||
||<style="color: #808080;">Uint8||<style="color: #808080;">'''padding2'''||<style="color: #808080;">||

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 index 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

Uint8

padding1

Uint8

padding2

Code Examples

You can add your code example here

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.


CategoryStruct, CategoryEvents

None: SDL_JoyHatEvent (last edited 2014-12-06 12:25:18 by PhilippWiesemann)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit