SDL_hid_get_device_info(3)
β¨ NAME β¨
SDL_hid_get_device_info β bestie, this is the one that gets the device info from a HID device π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_hidapi.h>
SDL_hid_device_info * SDL_hid_get_device_info(SDL_hid_device *dev);
π FUNCTION PARAMETERS π
devβ a device handle that you got back fromSDL_hid_open(). like, the one you already opened, no cap π«Ά
π RETURN VALUE π
It hands you back a pointer to the SDL_hid_device_info for this hid_device, or NULL if it failed π β and if it's NULL, pls call SDL_GetError() for more information, she'll tell you what went wrong.
β οΈ okay so this is the important part: that struct is only valid until the device is closed with SDL_hid_close(). after that it's giving expired, do not touch it π
π¦ AVAILABILITY π¦
This function has been available since SDL 3.2.0 β¨ so if you're on anything older, it's literally not there yet, sorry bestie π
okay that's the whole page, you ate that π go get your device info and slay π
mwah π β written under the Simple Directmedia Layer, SDL 3.4.18, page SDL_hid_get_device_info(3) β see you in the group chat ππ
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms