getTypeForId static method

int getTypeForId(
  1. int instanceId
)

Get the type of a gamepad.

This can be called before any gamepads are opened.

\param instance_id the joystick instance ID. \returns the gamepad type.

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

\since This function is available since SDL 3.2.0.

\sa SDL_GetGamepadType \sa SDL_GetGamepads \sa SDL_GetRealGamepadTypeForID

extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetGamepadTypeForID(SDL_JoystickID instance_id)

{@category gamepad}

Implementation

static int getTypeForId(int instanceId) => sdlGetGamepadTypeForId(instanceId);