getId method

int getId()

Get the instance ID of an opened gamepad.

\param gamepad a gamepad identifier previously returned by SDL_OpenGamepad(). \returns the instance ID of the specified gamepad on success or 0 on failure; call SDL_GetError() for more information.

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

\since This function is available since SDL 3.2.0.

extern SDL_DECLSPEC SDL_JoystickID SDLCALL SDL_GetGamepadID(SDL_Gamepad *gamepad)

{@category gamepad}

Implementation

int getId() => sdlGetGamepadId(this);