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 from SDL_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