SDL_GetJoystickPlayerIndex

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.

extern (C) nothrow @nogc extern
int
SDL_GetJoystickPlayerIndex

Parameters

joystick SDL_Joystick*

the SDL_Joystick obtained from SDL_OpenJoystick().

Return Value

Type: int

The player index, or -1 if it's not available.

See Also

Meta