sdlGetGamepadTouchpadFinger function

bool sdlGetGamepadTouchpadFinger(
  1. Pointer<SdlGamepad> gamepad,
  2. int touchpad,
  3. int finger,
  4. Pointer<Uint8> down,
  5. Pointer<Float> x,
  6. Pointer<Float> y,
  7. 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 sdlGetGamepadTouchpadFinger(
    Pointer<SdlGamepad> gamepad,
    int touchpad,
    int finger,
    Pointer<Uint8> down,
    Pointer<Float> x,
    Pointer<Float> y,
    Pointer<Float> pressure) {
  final sdlGetGamepadTouchpadFingerLookupFunction = libSdl3.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;
}