sdlGetJoystickPlayerIndexForId function joystick
Get the player index of a joystick.
This can be called before any joysticks are opened.
\param instance_id the joystick instance ID. \returns the player index of a joystick, or -1 if it's not available.
\threadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.2.0.
\sa SDL_GetJoystickPlayerIndex \sa SDL_GetJoysticks
extern SDL_DECLSPEC int SDLCALL SDL_GetJoystickPlayerIndexForID(SDL_JoystickID instance_id)
Implementation
int sdlGetJoystickPlayerIndexForId(int instanceId) {
final sdlGetJoystickPlayerIndexForIdLookupFunction = _libSdl
.lookupFunction<
Int32 Function(Uint32 instanceId),
int Function(int instanceId)
>('SDL_GetJoystickPlayerIndexForID');
return sdlGetJoystickPlayerIndexForIdLookupFunction(instanceId);
}