sdlSendGamepadEffect function

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.

\since This function is available since SDL 3.1.3.

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 = libSdl3.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;
}