sdlIsGamepad function
Check if the given joystick is supported by the gamepad interface.
\param instance_id the joystick instance ID. \returns true if the given joystick is supported by the gamepad interface, false if it isn't or it's an invalid index.
\since This function is available since SDL 3.1.3.
\sa SDL_GetJoysticks \sa SDL_OpenGamepad
extern SDL_DECLSPEC bool SDLCALL SDL_IsGamepad(SDL_JoystickID instance_id)
Implementation
bool sdlIsGamepad(int instanceId) {
final sdlIsGamepadLookupFunction = libSdl3.lookupFunction<
Uint8 Function(Uint32 instanceId),
int Function(int instanceId)>('SDL_IsGamepad');
return sdlIsGamepadLookupFunction(instanceId) == 1;
}