sdlGamepadConnected function
Check if a gamepad has been opened and is currently connected.
\param gamepad a gamepad identifier previously returned by SDL_OpenGamepad(). \returns true if the gamepad has been opened and is currently connected, or false if not.
\since This function is available since SDL 3.1.3.
extern SDL_DECLSPEC bool SDLCALL SDL_GamepadConnected(SDL_Gamepad *gamepad)
Implementation
bool sdlGamepadConnected(Pointer<SdlGamepad> gamepad) {
final sdlGamepadConnectedLookupFunction = libSdl3.lookupFunction<
Uint8 Function(Pointer<SdlGamepad> gamepad),
int Function(Pointer<SdlGamepad> gamepad)>('SDL_GamepadConnected');
return sdlGamepadConnectedLookupFunction(gamepad) == 1;
}