---
name: "SDL_hid_device_change_count"
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_device_change_count"
---

# SDL\_hid\_device\_change\_count(3)

Check to see if devices may have been added or removed.

## NAME

SDL\_hid\_device\_change\_count - Check to see if devices may have been added or removed.

## HEADER FILE

Defined in SDL3/SDL\_hidapi.h

## SYNOPSIS

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

**Uint32 SDL\_hid\_device\_change\_count(void);**

## DESCRIPTION

Enumerating the HID devices is an expensive operation, so you can call this to see if there have been any system device changes since the last call to this function. A change in the counter returned doesn't necessarily mean that anything has changed, but you can call

**SDL\_hid\_enumerate** () to get an updated device list.

Calling this function for the first time may cause a thread or other system resource to be allocated to track device change notifications.

## RETURN VALUE

( **Uint32** ) Returns a change counter that is incremented with each potential device change, or 0 if device change detection isn't available.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_hid\_enumerate**(3)](/SDL_hid_enumerate/3.md)
