sdlGetGamepadSteamHandle function

int sdlGetGamepadSteamHandle(
  1. Pointer<SdlGamepad> gamepad
)

Get the Steam Input handle of an opened gamepad, if available.

Returns an InputHandle_t for the gamepad that can be used with Steam Input API: https://partner.steamgames.com/doc/api/ISteamInput

\param gamepad the gamepad object to query. \returns the gamepad handle, or 0 if unavailable.

\since This function is available since SDL 3.1.3.

extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetGamepadSteamHandle(SDL_Gamepad *gamepad)

Implementation

int sdlGetGamepadSteamHandle(Pointer<SdlGamepad> gamepad) {
  final sdlGetGamepadSteamHandleLookupFunction = libSdl3.lookupFunction<
      Uint64 Function(Pointer<SdlGamepad> gamepad),
      int Function(Pointer<SdlGamepad> gamepad)>('SDL_GetGamepadSteamHandle');
  return sdlGetGamepadSteamHandleLookupFunction(gamepad);
}