sdlStopHapticEffects function

bool sdlStopHapticEffects(
  1. Pointer<SdlHaptic> haptic
)

Stop all the currently playing effects on a haptic device.

\param haptic the SDL_Haptic device to stop. \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_RunHapticEffect \sa SDL_StopHapticEffects

extern SDL_DECLSPEC bool SDLCALL SDL_StopHapticEffects(SDL_Haptic *haptic)

Implementation

bool sdlStopHapticEffects(Pointer<SdlHaptic> haptic) {
  final sdlStopHapticEffectsLookupFunction = libSdl3.lookupFunction<
      Uint8 Function(Pointer<SdlHaptic> haptic),
      int Function(Pointer<SdlHaptic> haptic)>('SDL_StopHapticEffects');
  return sdlStopHapticEffectsLookupFunction(haptic) == 1;
}