SDL_hid_get_...cturer_string(3)

✨ NAME ✨

SDL_hid_get_manufacturer_string β€” bestie, we're grabbing the Manufacturer String off a HID device πŸ’–

It's an SDL3 function, so that's the manual family it lives in. Slay.


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_hidapi.h>

int SDL_hid_get_manufacturer_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);

πŸŽ€ FUNCTION PARAMETERS πŸŽ€

okay so here's the three things you gotta hand over, no cap:

  • dev β€” a device handle that came back from SDL_hid_open(). like, you gotta already have the device open, we can't just vibe-check a random pointer 🫢
  • string β€” a wide string buffer where the data gets dropped. this is where the manufacturer name goes, so make sure it's got room ✨
  • maxlen β€” the length of that buffer, counted in multiples of wchar_t. yes bestie, multiples of wchar_t, not bytes πŸ’…

πŸ‘‘ RETURN VALUE πŸ‘‘

Returns 0 on success, or a negative error code if it didn't work out 😭. When it fails, call SDL_GetError() for more info β€” that's where the tea is.


πŸ¦‹ AVAILABILITY πŸ¦‹

This function has been available since SDL 3.2.0. so if you're on something older, it's giving "not yet" πŸ™ˆ


lowkey reminder: this is the manufacturer string, not the product string or the serial number. don't mix them up, i'm begging 🧚

and that's the whole page, periodt πŸ’œ this little legend comes to you from Simple Directmedia Layer, version SDL 3.4.18 β€” mwah, love that for us 🌈⭐

πŸ“¦ where this page comes from