---
name: "SDL_GetHapticFromID"
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_GetHapticFromID"
---

# SDL\_GetHapticFromID(3)

Get the SDL\_Haptic associated with an instance ID, if it has been opened.

## NAME

SDL\_GetHapticFromID - Get the  **SDL\_Haptic**\
  associated with an instance ID, if it has been opened.

## HEADER FILE

Defined in SDL3/SDL\_haptic.h

## SYNOPSIS

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

**SDL\_Haptic \* SDL\_GetHapticFromID(SDL\_HapticID instance\_id);**

## FUNCTION PARAMETERS

- *instance\_id*

  the instance ID to get the  **SDL\_Haptic**\
    for.

## RETURN VALUE

( **SDL\_Haptic**\
  \*) Returns an  **SDL\_Haptic**\
  on success or NULL on failure or if it hasn't been opened yet; call

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

## AVAILABILITY

This function is available since SDL 3.2.0.
