sdlHasJoystick function joystick
Return whether a joystick is currently connected.
\returns true if a joystick 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_GetJoysticks
extern SDL_DECLSPEC bool SDLCALL SDL_HasJoystick(void)
Implementation
bool sdlHasJoystick() {
final sdlHasJoystickLookupFunction = _libSdl
.lookupFunction<Uint8 Function(), int Function()>('SDL_HasJoystick');
return sdlHasJoystickLookupFunction() == 1;
}