---
name: "SDL_OpenHapticFromMouse"
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_OpenHapticFromMouse"
---

# SDL\_OpenHapticFromMouse(3)

Try to open a haptic device from the current mouse.

## NAME

SDL\_OpenHapticFromMouse - Try to open a haptic device from the current mouse.

## HEADER FILE

Defined in SDL3/SDL\_haptic.h

## SYNOPSIS

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

**SDL\_Haptic \* SDL\_OpenHapticFromMouse(void);**

## RETURN VALUE

( **SDL\_Haptic**\
  \*) Returns the haptic device identifier or NULL on failure; call  **SDL\_GetError** () for more information.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_CloseHaptic**(3)](/SDL_CloseHaptic/3.md), **•**(3), [**SDL\_IsMouseHaptic**(3)](/SDL_IsMouseHaptic/3.md)
