SDL_GETJOYSTICKPRODUCTVERSION(3)
๐ SDL_GetJoystickProductVersion ๐
okay bestie, welcome to the joystick lore page ๐ฎโจ this is SDL_GetJoystickProductVersion, a function from the SDL3 crew, and it's about to tell you the product version of an opened joystick โ if it even has one. let's get into it ๐ซถ
โจ SYNOPSIS โจ
#include <SDL3/SDL_joystick.h>
Uint16 SDL_GetJoystickProductVersion(SDL_Joystick *joystick);
no cap, that's the whole vibe. one include, one function call, one Uint16 coming back at you ๐
๐ธ DESCRIPTION ๐ธ
so like, the way this works is: if the product version isn't available, this function just returns 0. that's it. that's the tea โ
it's giving "no data, no drama" fr fr.
๐ FUNCTION PARAMETERS ๐
joystickโ theSDL_Joystickyou got fromSDL_OpenJoystick(). yes, it has to be opened first, bestie, we don't do unopened joysticks around here ๐
โญ RETURN VALUE โญ
returns the product version of the selected joystick ๐ โฆor 0 if it's simply not available. iconic either way, ngl.
๐ง THREAD SAFETY ๐ง
it is safe to call this function from any thread. periodt. go wild, spawn all the threads you want, she's chill ๐
๐ AVAILABILITY ๐
this function has been available since SDL 3.2.0 ๐ so if you're on anything older, sorry babe, no product version for you ๐ญ
๐ฆ SEE ALSO ๐ฆ
SDL_GetJoystickProductVersionForID(3)โ the sibling function, go say hi ๐
and that's the whole page!! mwah ๐ this lil writeup came to you courtesy of Simple Directmedia Layer, SDL version 3.4.18, and it's the SDL_GetJoystickProductVersion(3) page โ slay, bye bestie, go read your joystick versions ๐โจ๐
๐ฆ 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