SDL_UpdateHapticEffect(3)

SDL_UpdateHapticEffect3

Update the properties of an effect.

Usage

#include "SDL3/SDL.h"

bool SDL_UpdateHapticEffect(SDL_Haptic *haptic, int effect, const SDL_HapticEffect *data);

Header file

Defined in SDL3/SDL_haptic.h

Overview

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 ().

Function parameters

haptic

the SDL_Haptic
device that has the effect.

effect

the identifier of the effect to update.

data

an SDL_HapticEffect
structure containing the new effect properties to use.

Return value

Returns true on success or false on failure; call

SDL_GetError () for more information.

Availability

This function is available since SDL 3.2.0.

From libsdl3-doc 3.2.10+ds-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.