Name
sdl.GetHat -- query state of specified hat
Synopsis
state = sdl.GetHat(port, hat)
Function
Use this function to get the current state of a POV hat on a joystick. This is only possible for joysticks, not for game controllers. You have to pass the hat index to get the state from. Hat indices start at index 0.

The return value will be one of the following predefined constants:

 
#SDL_HAT_CENTERED
#SDL_HAT_UP
#SDL_HAT_RIGHT
#SDL_HAT_DOWN
#SDL_HAT_LEFT
#SDL_HAT_RIGHTUP
#SDL_HAT_RIGHTDOWN
#SDL_HAT_LEFTUP
#SDL_HAT_LEFTDOWN

Inputs
port
game port to query
hat
hat index whose state to get
Results
state
state of specified hat

Show TOC