sdlGetJoystickHat function joystick
Get the current state of a POV hat on a joystick.
The returned value will be one of the SDL_HAT_*
values.
\param joystick an SDL_Joystick structure containing joystick information. \param hat the hat index to get the state from; indices start at index 0. \returns the current hat position.
\threadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.2.0.
\sa SDL_GetNumJoystickHats
extern SDL_DECLSPEC Uint8 SDLCALL SDL_GetJoystickHat(SDL_Joystick *joystick, int hat)
Implementation
int sdlGetJoystickHat(Pointer<SdlJoystick> joystick, int hat) {
final sdlGetJoystickHatLookupFunction = _libSdl
.lookupFunction<
Uint8 Function(Pointer<SdlJoystick> joystick, Int32 hat),
int Function(Pointer<SdlJoystick> joystick, int hat)
>('SDL_GetJoystickHat');
return sdlGetJoystickHatLookupFunction(joystick, hat);
}