Tao.Sdl SDK Documentation

Sdl.SDL_JoystickGetHat Method 

Get the current state of a joystick hat

[Visual Basic]
Public Shared Function SDL_JoystickGetHat( _
   ByVal joystick As IntPtr, _
   ByVal hat As Integer _
) As Byte
[C#]
public static byte SDL_JoystickGetHat(
   IntPtr joystick,
   int hat
);

Parameters

joystick
hat

Return Value

The current state is returned as a byte which is defined as an OR'd combination of one or more of the following:

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 

Remarks

SDL_JoystickGetHat returns the current state of the given hat on the given joystick.

Binds to C-function in SDL_joystick.h

Uint8 SDL_JoystickGetHat(SDL_Joystick *joystick, int hat)
            

See Also

Sdl Class | Tao.Sdl Namespace | SDL_JoystickNumHats