sdlGetJoystickTypeForId function joystick
Get the type of a joystick, if available.
This can be called before any joysticks are opened.
\param instance_id the joystick instance ID.
\returns the SDL_JoystickType of the selected joystick. If called with an
invalid instance_id, this function returns
SDL_JOYSTICK_TYPE_UNKNOWN
.
\threadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.2.0.
\sa SDL_GetJoystickType \sa SDL_GetJoysticks
extern SDL_DECLSPEC SDL_JoystickType SDLCALL SDL_GetJoystickTypeForID(SDL_JoystickID instance_id)
Implementation
int sdlGetJoystickTypeForId(int instanceId) {
final sdlGetJoystickTypeForIdLookupFunction = _libSdl
.lookupFunction<
Int32 Function(Uint32 instanceId),
int Function(int instanceId)
>('SDL_GetJoystickTypeForID');
return sdlGetJoystickTypeForIdLookupFunction(instanceId);
}