---
name: "SDL_hid_open_path"
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_hid_open_path"
---

# SDL\_hid\_open\_path(3)

Open a HID device by its path name.

## NAME

SDL\_hid\_open\_path - Open a HID device by its path name.

## HEADER FILE

Defined in SDL3/SDL\_hidapi.h

## SYNOPSIS

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

**SDL\_hid\_device \* SDL\_hid\_open\_path(const char \*path);**

## DESCRIPTION

The path name be determined by calling

**SDL\_hid\_enumerate** (), or a platform-specific path name can be used (eg: /dev/hidraw0 on Linux).

## FUNCTION PARAMETERS

- *path*

  the path name of the device to open.

## RETURN VALUE

( **SDL\_hid\_device**\
  \*) Returns a pointer to a

**SDL\_hid\_device**\
  object on success or NULL on failure; call

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

## AVAILABILITY

This function is available since SDL 3.2.0.
