---
name: "SDL_DestroyHapticEffect"
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_DestroyHapticEffect"
---

# SDL\_DestroyHapticEffect(3)

Destroy a haptic effect on the device.

## NAME

SDL\_DestroyHapticEffect - Destroy a haptic effect on the device.

## HEADER FILE

Defined in SDL3/SDL\_haptic.h

## SYNOPSIS

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

**void SDL\_DestroyHapticEffect(SDL\_Haptic \*haptic, int effect);**

## DESCRIPTION

This will stop the effect if it's running. Effects are automatically destroyed when the device is closed.

## FUNCTION PARAMETERS

- *haptic*

  the  **SDL\_Haptic**\
    device to destroy the effect on.

- *effect*

  the ID of the haptic effect to destroy.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

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