sdlPauseHaptic function
Pause a haptic device.
Device must support the SDL_HAPTIC_PAUSE
feature. Call SDL_ResumeHaptic()
to resume playback.
Do not modify the effects nor add new ones while the device is paused. That can cause all sorts of weird errors.
\param haptic the SDL_Haptic device to pause. \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_ResumeHaptic
extern SDL_DECLSPEC bool SDLCALL SDL_PauseHaptic(SDL_Haptic *haptic)
Implementation
bool sdlPauseHaptic(Pointer<SdlHaptic> haptic) {
final sdlPauseHapticLookupFunction = libSdl3.lookupFunction<
Uint8 Function(Pointer<SdlHaptic> haptic),
int Function(Pointer<SdlHaptic> haptic)>('SDL_PauseHaptic');
return sdlPauseHapticLookupFunction(haptic) == 1;
}