Function SDL_GetJoystickPlayerIndex

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

Get the player index of an opened joystick.

For XInput controllers this returns the XInput user index. Many joysticks will not be able to supply this information.

§Parameters

§Return value

Returns the player index, or -1 if it’s not available.

§Availability

This function is available since SDL 3.2.0.

§See also