SDL Wiki
(This is the legacy documentation for stable SDL2, the current stable version; SDL3 is the current development version.)

SDL_hid_device_change_count

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

Header File

Defined in SDL_hidapi.h, but apps should only #include "SDL.h"!

Syntax

Uint32 SDL_hid_device_change_count(void);

Return Value

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

Remarks

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.

Version

This function is available since SDL 2.0.18.

See Also


CategoryAPI, CategoryAPIFunction


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.