sdlGetRealGamepadTypeForId function gamepad

int sdlGetRealGamepadTypeForId(
  1. int instanceId
)

Get the type of a gamepad, ignoring any mapping override.

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_GetGamepadTypeForID \sa SDL_GetGamepads \sa SDL_GetRealGamepadType

extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetRealGamepadTypeForID(SDL_JoystickID instance_id)

Implementation

int sdlGetRealGamepadTypeForId(int instanceId) {
  final sdlGetRealGamepadTypeForIdLookupFunction = _libSdl
      .lookupFunction<
        Int32 Function(Uint32 instanceId),
        int Function(int instanceId)
      >('SDL_GetRealGamepadTypeForID');
  return sdlGetRealGamepadTypeForIdLookupFunction(instanceId);
}