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 🌈


🧚 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