open static method

Pointer<SdlGamepad> open(
  1. int instanceId
)

Open a gamepad for use.

\param instance_id the joystick instance ID. \returns a gamepad identifier or NULL if an error occurred; 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.

\sa SDL_CloseGamepad \sa SDL_IsGamepad

extern SDL_DECLSPEC SDL_Gamepad * SDLCALL SDL_OpenGamepad(SDL_JoystickID instance_id)

{@category gamepad}

Implementation

static Pointer<SdlGamepad> open(int instanceId) => sdlOpenGamepad(instanceId);