sdlGetGamepadCapSense function gamepad
Get the current state of a capsense on a gamepad.
\param gamepad a gamepad. \param type the type of capsense to query. \returns true if the capsense is touched, 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_GamepadHasCapSense
extern SDL_DECLSPEC bool SDLCALL SDL_GetGamepadCapSense(SDL_Gamepad *gamepad, SDL_GamepadCapSenseType type)
Implementation
bool sdlGetGamepadCapSense(Pointer<SdlGamepad> gamepad, int type) {
final sdlGetGamepadCapSenseLookupFunction = _libSdl
.lookupFunction<
Uint8 Function(Pointer<SdlGamepad> gamepad, Int32 type),
int Function(Pointer<SdlGamepad> gamepad, int type)
>('SDL_GetGamepadCapSense');
return sdlGetGamepadCapSenseLookupFunction(gamepad, type) == 1;
}