SDL_GetGamep...tVersionForID(3)

πŸ’– NAME πŸ’–

SDL_GetGamepadProductVersionForID β€” bestie, this one hands you the product version of a gamepad, if it's even available like that. ✨

Oh and hey, welcome to the SDL3 FUNCTIONS corner of the manual, the SDL_GetGamep...tVersionForID(3) page, no cap. πŸŽ€


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_gamepad.h>

Uint16 SDL_GetGamepadProductVersionForID(SDL_JoystickID instance_id);

✨ DESCRIPTION ✨

Okay so here's the tea: you can call this one before any gamepads are even opened. Iconic behaviour, honestly. πŸ’…

But β€” and listen β€” if the product version isn't available? It just returns 0. Not a vibe, but that's the deal. 🫢


πŸ¦‹ FUNCTION PARAMETERS πŸ¦‹

  • instance_id β€” the joystick instance ID. that's it, that's the whole parameter, she's simple like that πŸ’œ

πŸ’€ RETURN VALUE πŸ’€

Returns the product version of the selected gamepad. πŸŽ‰

And if you called it on an invalid index, this function returns zero. Yeah. Zero. Not me getting nothing back 😭


🧚 THREAD SAFETY 🧚

It is safe to call this function from any thread. Every single one. Go off, multithreaded queen. πŸ‘‘


⭐ AVAILABILITY ⭐

This function is available since SDL 3.2.0. Periodt.


πŸ”₯ SEE ALSO πŸ”₯


and that's the whole page, bestie, you ate it up πŸ’–

This lil masterpiece comes to you from Simple Directmedia Layer, living its SDL 3.4.18 era β€” shoutout to the SDL_GetGamep...tVersionForID(3) footer energy, we love a source and version glow-up. πŸŒˆπŸ’…πŸ¦‹

πŸ“¦ where this page comes from