sdlPlayHapticRumble function haptic
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 true on success or false on failure; call SDL_GetError() for more information.
\since This function is available since SDL 3.2.0.
\sa SDL_InitHapticRumble \sa SDL_StopHapticRumble
extern SDL_DECLSPEC bool SDLCALL SDL_PlayHapticRumble(SDL_Haptic *haptic, float strength, Uint32 length)
Implementation
bool sdlPlayHapticRumble(
Pointer<SdlHaptic> haptic,
double strength,
int length,
) {
final sdlPlayHapticRumbleLookupFunction = _libSdl
.lookupFunction<
Uint8 Function(
Pointer<SdlHaptic> haptic,
Float strength,
Uint32 length,
),
int Function(Pointer<SdlHaptic> haptic, double strength, int length)
>('SDL_PlayHapticRumble');
return sdlPlayHapticRumbleLookupFunction(haptic, strength, length) == 1;
}