sdlGetGamepadTouchpadFinger function gamepad
Get the current state of a finger on a touchpad on a gamepad.
\param gamepad a gamepad. \param touchpad a touchpad. \param finger a finger. \param down a pointer filled with true if the finger is down, false otherwise, may be NULL. \param x a pointer filled with the x position, normalized 0 to 1, with the origin in the upper left, may be NULL. \param y a pointer filled with the y position, normalized 0 to 1, with the origin in the upper left, may be NULL. \param pressure a pointer filled with pressure value, may be NULL. \returns true on success or false on failure; call SDL_GetError() for more information.
\threadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.2.0.
\sa SDL_GetNumGamepadTouchpadFingers
extern SDL_DECLSPEC bool SDLCALL SDL_GetGamepadTouchpadFinger(SDL_Gamepad *gamepad, int touchpad, int finger, bool *down, float *x, float *y, float *pressure)
Implementation
bool sdlGetGamepadTouchpadFinger(
Pointer<SdlGamepad> gamepad,
int touchpad,
int finger,
Pointer<Uint8> down,
Pointer<Float> x,
Pointer<Float> y,
Pointer<Float> pressure,
) {
final sdlGetGamepadTouchpadFingerLookupFunction = _libSdl
.lookupFunction<
Uint8 Function(
Pointer<SdlGamepad> gamepad,
Int32 touchpad,
Int32 finger,
Pointer<Uint8> down,
Pointer<Float> x,
Pointer<Float> y,
Pointer<Float> pressure,
),
int Function(
Pointer<SdlGamepad> gamepad,
int touchpad,
int finger,
Pointer<Uint8> down,
Pointer<Float> x,
Pointer<Float> y,
Pointer<Float> pressure,
)
>('SDL_GetGamepadTouchpadFinger');
return sdlGetGamepadTouchpadFingerLookupFunction(
gamepad,
touchpad,
finger,
down,
x,
y,
pressure,
) ==
1;
}