isGamepad static method

bool isGamepad(
  1. int instanceId
)

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.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL 3.2.0.

\sa SDL_GetJoysticks \sa SDL_OpenGamepad

extern SDL_DECLSPEC bool SDLCALL SDL_IsGamepad(SDL_JoystickID instance_id)

{@category gamepad}

Implementation

static bool isGamepad(int instanceId) => sdlIsGamepad(instanceId);