sdlHapticRumbleInit function

int sdlHapticRumbleInit(
  1. Pointer<SdlHaptic> haptic
)

Initialize a haptic device for simple rumble playback.

\param haptic the haptic device to initialize for simple rumble playback \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_HapticOpen \sa SDL_HapticRumblePlay \sa SDL_HapticRumbleStop \sa SDL_HapticRumbleSupported

extern DECLSPEC int SDLCALL SDL_HapticRumbleInit(SDL_Haptic * haptic)

Implementation

int sdlHapticRumbleInit(Pointer<SdlHaptic> haptic) {
  final sdlHapticRumbleInitLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Pointer<SdlHaptic> haptic),
      int Function(Pointer<SdlHaptic> haptic)>('SDL_HapticRumbleInit');
  return sdlHapticRumbleInitLookupFunction(haptic);
}