sdlHasGamepad function gamepad
Return whether a gamepad is currently connected.
\returns true if a gamepad is connected, false otherwise.
\threadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.2.0.
\sa SDL_GetGamepads
extern SDL_DECLSPEC bool SDLCALL SDL_HasGamepad(void)
Implementation
bool sdlHasGamepad() {
final sdlHasGamepadLookupFunction = _libSdl
.lookupFunction<Uint8 Function(), int Function()>('SDL_HasGamepad');
return sdlHasGamepadLookupFunction() == 1;
}