Function SDL_GameControllerGetPlayerIndex

pub unsafe extern "C" fn SDL_GameControllerGetPlayerIndex(
    gamecontroller: *mut _SDL_GameController,
) -> i32
Available on crate feature dep_sdl2 only.
Expand description

Get the player index of an opened game controller.

For XInput controllers this returns the XInput user index.

\param gamecontroller the game controller object to query. \returns the player index for controller, or -1 if it’s not available.

\since This function is available since SDL 2.0.9.