---
name: "SDL_GetMaxHapticEffects"
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_GetMaxHapticEffects"
---

# SDL\_GetMaxHapticEffects(3)

Get the number of effects a haptic device can store.

## NAME

SDL\_GetMaxHapticEffects - Get the number of effects a haptic device can store.

## HEADER FILE

Defined in SDL3/SDL\_haptic.h

## SYNOPSIS

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

**int SDL\_GetMaxHapticEffects(SDL\_Haptic \*haptic);**

## DESCRIPTION

On some platforms this isn't fully supported, and therefore is an approximation. Always check to see if your created effect was actually created and do not rely solely on

**SDL\_GetMaxHapticEffects** ().

## FUNCTION PARAMETERS

- *haptic*

  the  **SDL\_Haptic**\
    device to query.

## RETURN VALUE

Returns the number of effects the haptic device can store or a negative error code on failure; call  **SDL\_GetError** () for more information.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_GetMaxHapticEffectsPlaying**(3)](/SDL_GetMaxHapticEffectsPlaying/3.md), **•**(3), [**SDL\_GetHapticFeatures**(3)](/SDL_GetHapticFeatures/3.md)
