Function SDL_JoystickGetPlayerIndex

pub unsafe extern "C" fn SDL_JoystickGetPlayerIndex(
    joystick: *mut _SDL_Joystick,
) -> i32
Available on crate feature dep_sdl2 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.

\param joystick the SDL_Joystick obtained from SDL_JoystickOpen() \returns the player index, or -1 if it’s not available.

\since This function is available since SDL 2.0.9.