sdlHapticRumblePlay function

int sdlHapticRumblePlay(
  1. Pointer<SdlHaptic> haptic,
  2. double strength,
  3. int length
)

Run a simple rumble effect on a haptic device.

\param haptic the haptic device to play the rumble effect on \param strength strength of the rumble to play as a 0-1 float value \param length length of the rumble to play in milliseconds \returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.

\since This function is available since SDL 2.0.0.

\sa SDL_HapticRumbleInit \sa SDL_HapticRumbleStop \sa SDL_HapticRumbleSupported

extern DECLSPEC int SDLCALL SDL_HapticRumblePlay(SDL_Haptic * haptic, float strength, Uint32 length )

Implementation

int sdlHapticRumblePlay(
    Pointer<SdlHaptic> haptic, double strength, int length) {
  final sdlHapticRumblePlayLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Pointer<SdlHaptic> haptic, Float strength, Uint32 length),
      int Function(Pointer<SdlHaptic> haptic, double strength,
          int length)>('SDL_HapticRumblePlay');
  return sdlHapticRumblePlayLookupFunction(haptic, strength, length);
}