SDL_GetJoystickPlayerIndex - Man Page
Get the player index of an opened joystick.
Header File
Defined in SDL3/SDL_joystick.h
Synopsis
#include "SDL3/SDL.h" int SDL_GetJoystickPlayerIndex(SDL_Joystick *joystick);
Description
For XInput controllers this returns the XInput user index. Many joysticks will not be able to supply this information.
Function Parameters
- joystick
the SDL_Joystick
obtained from SDL_OpenJoystick ().
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
Referenced By
SDL_GetJoystickFromPlayerIndex(3), SDL_GetJoystickPlayerIndexForID(3), SDL_SetJoystickPlayerIndex(3).
SDL 3.2.2 Simple Directmedia Layer SDL3 FUNCTIONS