sdlGetJoystickId function
Get the instance ID of an opened joystick.
\param joystick an SDL_Joystick structure containing joystick information. \returns the instance ID of the specified joystick on success or 0 on failure; call SDL_GetError() for more information.
\since This function is available since SDL 3.1.3.
extern SDL_DECLSPEC SDL_JoystickID SDLCALL SDL_GetJoystickID(SDL_Joystick *joystick)
Implementation
int sdlGetJoystickId(Pointer<SdlJoystick> joystick) {
final sdlGetJoystickIdLookupFunction = libSdl3.lookupFunction<
Uint32 Function(Pointer<SdlJoystick> joystick),
int Function(Pointer<SdlJoystick> joystick)>('SDL_GetJoystickID');
return sdlGetJoystickIdLookupFunction(joystick);
}