Function SDL_GetJoystickHat

pub unsafe extern "C" fn SDL_GetJoystickHat(
    joystick: *mut SDL_Joystick,
    hat: i32,
) -> u8
Available on crate feature dep_sdl3 only.
Expand description

Get the current state of a POV hat on a joystick.

The returned value will be one of the SDL_HAT_* values.

§Parameters

  • joystick: an SDL_Joystick structure containing joystick information.
  • hat: the hat index to get the state from; indices start at index 0.

§Return value

Returns the current hat position.

§Availability

This function is available since SDL 3.2.0.

§See also