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 โ€” the SDL_Joystick you got from SDL_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 ๐Ÿฆ‹


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