---
name: "SDL_GetNumHapticAxes"
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_GetNumHapticAxes"
---

# SDL\_GetNumHapticAxes(3)

Get the number of haptic axes the device has.

## NAME

SDL\_GetNumHapticAxes - Get the number of haptic axes the device has.

## HEADER FILE

Defined in SDL3/SDL\_haptic.h

## SYNOPSIS

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

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

## DESCRIPTION

The number of haptic axes might be useful if working with the

**SDL\_HapticDirection**\
  effect.

## FUNCTION PARAMETERS

- *haptic*

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

## RETURN VALUE

Returns the number of axes on success or -1 on failure; call

**SDL\_GetError** () for more information.

## AVAILABILITY

This function is available since SDL 3.2.0.
