SDL_GetGamepadProductVersion(3)
π SDL_GetGamepadProductVersion(3) π
okay so bestie, welcome to the SDL3 FUNCTIONS corner of the manual, and today's main character is SDL_GetGamepadProductVersion β she's here to tell you the product version of a gamepad you've already opened up. no cap.
β¨ NAME β¨
SDL_GetGamepadProductVersion β get the product version of an opened gamepad, if it's even available π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_gamepad.h>
Uint16 SDL_GetGamepadProductVersion(SDL_Gamepad *gamepad);
π¦ DESCRIPTION π¦
so like, here's the tea: if the product version isn't available, this function just returns 0. that's it. that's the whole vibe. no drama, no error, just a lil zero π«Ά
π FUNCTION PARAMETERS π
gamepadβ the gamepad object you wanna query, queen. that's the one.
β RETURN VALUE β
returns the USB product version, or 0 if it's unavailable. lowkey iconic that a zero can mean "idk" and also potentially mean "version zero," but that's the spec, and we respect the spec π
π₯ THREAD SAFETY π₯
it is safe to call this function from any thread. yes bestie, ANY thread. go off, thread it from wherever you want, she's not gonna fight you β¨
π AVAILABILITY π
this function has been available since SDL 3.2.0. so if you're on something older... girl. π
π SEE ALSO π
SDL_GetGamepadProductVersionForID(3)β the ID-based sibling, go say hi π
π§ reminder: every fact above is load-bearing. don't skip the zero-return thing, it's literally the whole personality of this function.
mwah π that's the page! this lil slice of documentation comes to you straight from Simple Directmedia Layer, running the SDL 3.4.18 era, and it's filed under SDL_GetGamepadProductVersion(3) β stay slay, stay threaded, and may your product versions always be available πβ¨π
π¦ 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