SDL_GetJoystickVendor(3)
๐ SDL_GetJoystickVendor(3) ๐
okay so bestie, welcome to the SDL3 FUNCTIONS corner of the man pages, where we find out who actually made your controller ๐ฎโจ
โจ NAME โจ
SDL_GetJoystickVendor โ get the USB vendor ID of an opened joystick, if it's available ๐
๐ธ SYNOPSIS ๐ธ
#include <SDL3/SDL_joystick.h>
Uint16 SDL_GetJoystickVendor(SDL_Joystick *joystick);
๐ฆ DESCRIPTION ๐ฆ
so like, this function goes and grabs the USB vendor ID for you. iconic behaviour, no notes.
but if the vendor ID isn't available, this function returns 0. that's it. that's the whole vibe check. zero. nada. the void ๐ณ๏ธ
๐ FUNCTION PARAMETERS ๐
joystickโ theSDL_Joystickyou got fromSDL_OpenJoystick(). like, you gotta have actually opened it first, bestie, we can't read the aura of a joystick that doesn't exist yet ๐
โญ RETURN VALUE โญ
Returns the USB vendor ID of the selected joystick, or 0 if it's unavailable. that's the tea โ
๐ง THREAD SAFETY ๐ง
It is safe to call this function from any thread. any thread!! go wild, queen ๐
๐ AVAILABILITY ๐
This function is available since SDL 3.2.0. so if you're on something older... girl. upgrade. ๐ญ
๐ SEE ALSO ๐
Simple Directmedia Layer really said "here's your joystick lore" and dropped SDL 3.4.18 on us โ that's the source and the version, mwah, slay, periodt ๐โจ๐๐ฆ
๐ฆ 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