sdlGetGamepadGuidForId function

SdlGuid sdlGetGamepadGuidForId(
  1. int instanceId
)

Get the implementation-dependent GUID of a gamepad.

This can be called before any gamepads are opened.

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

\since This function is available since SDL 3.1.3.

\sa SDL_GUIDToString \sa SDL_GetGamepads

extern SDL_DECLSPEC SDL_GUID SDLCALL SDL_GetGamepadGUIDForID(SDL_JoystickID instance_id)

Implementation

SdlGuid sdlGetGamepadGuidForId(int instanceId) {
  final sdlGetGamepadGuidForIdLookupFunction = libSdl3.lookupFunction<
      SdlGuid Function(Uint32 instanceId),
      SdlGuid Function(int instanceId)>('SDL_GetGamepadGUIDForID');
  return sdlGetGamepadGuidForIdLookupFunction(instanceId);
}