sdlGetGamepadProductVersionForId function

int sdlGetGamepadProductVersionForId(
  1. int instanceId
)

Get the product version of a gamepad, if available.

This can be called before any gamepads are opened. If the product version isn't available this function returns 0.

\param instance_id the joystick instance ID. \returns the product version of the selected gamepad. If called on an invalid index, this function returns zero.

\since This function is available since SDL 3.1.3.

\sa SDL_GetGamepadProductVersion \sa SDL_GetGamepads

extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProductVersionForID(SDL_JoystickID instance_id)

Implementation

int sdlGetGamepadProductVersionForId(int instanceId) {
  final sdlGetGamepadProductVersionForIdLookupFunction = libSdl3.lookupFunction<
      Uint16 Function(Uint32 instanceId),
      int Function(int instanceId)>('SDL_GetGamepadProductVersionForID');
  return sdlGetGamepadProductVersionForIdLookupFunction(instanceId);
}