---
name: "SDL_UpdateHapticEffect"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_UpdateHapticEffect"
---

# SDL\_UpdateHapticEffect(3)

Update the properties of an effect.

## NAME

SDL\_UpdateHapticEffect - Update the properties of an effect.

## HEADER FILE

Defined in SDL3/SDL\_haptic.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**bool SDL\_UpdateHapticEffect(SDL\_Haptic \*haptic, int effect, const SDL\_HapticEffect \*data);**

## DESCRIPTION

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.

## SEE ALSO

**•**(3), [**SDL\_CreateHapticEffect**(3)](/SDL_CreateHapticEffect/3.md), **•**(3), [**SDL\_RunHapticEffect**(3)](/SDL_RunHapticEffect/3.md)
