sdlGamepadHasCapSense function gamepad
Return whether a gamepad has a particular capsense.
\param gamepad the gamepad to query. \param type the type of capsense to query. \returns true if the capsense exists, false otherwise.
\threadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.6.0.
\sa SDL_GetGamepadCapSense
extern SDL_DECLSPEC bool SDLCALL SDL_GamepadHasCapSense(SDL_Gamepad *gamepad, SDL_GamepadCapSenseType type)
Implementation
bool sdlGamepadHasCapSense(Pointer<SdlGamepad> gamepad, int type) {
final sdlGamepadHasCapSenseLookupFunction = _libSdl
.lookupFunction<
Uint8 Function(Pointer<SdlGamepad> gamepad, Int32 type),
int Function(Pointer<SdlGamepad> gamepad, int type)
>('SDL_GamepadHasCapSense');
return sdlGamepadHasCapSenseLookupFunction(gamepad, type) == 1;
}