getTouchpadFinger method

bool getTouchpadFinger(
  1. int touchpad,
  2. int finger,
  3. Pointer<Uint8> down,
  4. Pointer<Float> x,
  5. Pointer<Float> y,
  6. Pointer<Float> pressure,
)

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.

\since This function is available since SDL 3.1.3.

\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 getTouchpadFinger(int touchpad, int finger, Pointer<Uint8> down,
    Pointer<Float> x, Pointer<Float> y, Pointer<Float> pressure) {
  return sdlGetGamepadTouchpadFinger(
      this, touchpad, finger, down, x, y, pressure);
}