sdlSendGamepadEffect function gamepad

bool sdlSendGamepadEffect(
  1. Pointer<SdlGamepad> gamepad,
  2. Pointer<NativeType> data,
  3. int size
)

Send a gamepad specific effect packet.

\param gamepad the gamepad to affect. \param data the data to send to the gamepad. \param size the size of the data to send to the gamepad. \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.

extern SDL_DECLSPEC bool SDLCALL SDL_SendGamepadEffect(SDL_Gamepad *gamepad, const void *data, int size)

Implementation

bool sdlSendGamepadEffect(
  Pointer<SdlGamepad> gamepad,
  Pointer<NativeType> data,
  int size,
) {
  final sdlSendGamepadEffectLookupFunction = _libSdl
      .lookupFunction<
        Uint8 Function(
          Pointer<SdlGamepad> gamepad,
          Pointer<NativeType> data,
          Int32 size,
        ),
        int Function(
          Pointer<SdlGamepad> gamepad,
          Pointer<NativeType> data,
          int size,
        )
      >('SDL_SendGamepadEffect');
  return sdlSendGamepadEffectLookupFunction(gamepad, data, size) == 1;
}