sdlInitHapticRumble function

bool sdlInitHapticRumble(
  1. Pointer<SdlHaptic> haptic
)

Initialize a haptic device for simple rumble playback.

\param haptic the haptic device to initialize for simple rumble playback. \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_PlayHapticRumble \sa SDL_StopHapticRumble \sa SDL_HapticRumbleSupported

extern SDL_DECLSPEC bool SDLCALL SDL_InitHapticRumble(SDL_Haptic *haptic)

Implementation

bool sdlInitHapticRumble(Pointer<SdlHaptic> haptic) {
  final sdlInitHapticRumbleLookupFunction = libSdl3.lookupFunction<
      Uint8 Function(Pointer<SdlHaptic> haptic),
      int Function(Pointer<SdlHaptic> haptic)>('SDL_InitHapticRumble');
  return sdlInitHapticRumbleLookupFunction(haptic) == 1;
}