updateEffect method

bool updateEffect(
  1. int effect,
  2. SdlxHapticEffect data
)

Update the properties of an effect.

Can be used dynamically, although behavior when dynamically changing direction may be strange. Specifically the effect may re-upload itself and start playing from the start. You also cannot change the type either when running SDL_UpdateHapticEffect().

\param haptic the SDL_Haptic device that has the effect. \param effect the identifier of the effect to update. \param data an SDL_HapticEffect structure containing the new effect properties to use. \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_CreateHapticEffect \sa SDL_RunHapticEffect

extern SDL_DECLSPEC bool SDLCALL SDL_UpdateHapticEffect(SDL_Haptic *haptic, SDL_HapticEffectID effect, const SDL_HapticEffect *data)

Implementation

bool updateEffect(int effect, SdlxHapticEffect data) =>
    sdlxUpdateHapticEffect(this, effect, data);