logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_GetJoystickPlayerIndex - Get the player index of an opened joystick.

Availability

       This function is available since SDL 3.2.0.

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 ().

Header File

       Defined in SDL3/SDL_joystick.h

Name

       SDL_GetJoystickPlayerIndex - Get the player index of an opened joystick.

Return Value

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

See Also

â€ĸ(3), SDL_SetJoystickPlayerIndex(3)

Simple Directmedia Layer                           SDL 3.2.10                      SDL_GetJoystickPlayerIndex(3)

Synopsis

#include"SDL3/SDL.h"intSDL_GetJoystickPlayerIndex(SDL_Joystick*joystick);

See Also