sdlOpenGamepad function gamepad
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)
Implementation
Pointer<SdlGamepad> sdlOpenGamepad(int instanceId) {
final sdlOpenGamepadLookupFunction = _libSdl
.lookupFunction<
Pointer<SdlGamepad> Function(Uint32 instanceId),
Pointer<SdlGamepad> Function(int instanceId)
>('SDL_OpenGamepad');
return sdlOpenGamepadLookupFunction(instanceId);
}