SDL_GetGamepadProduct(3)
๐ SDL_GetGamepadProduct ๐
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where we're talking about SDL_GetGamepadProduct โ the little function that tells you the USB product ID of an opened gamepad, if it even has one to give you. no cap. ๐ฎโจ
โจ NAME โจ
SDL_GetGamepadProduct โ get the USB product ID of an opened gamepad, if available.
๐ธ SYNOPSIS ๐ธ
#include <SDL3/SDL_gamepad.h>
Uint16 SDL_GetGamepadProduct(SDL_Gamepad *gamepad);
๐ฆ DESCRIPTION ๐ฆ
so basically, you hand it a gamepad and it goes and finds the USB product ID for you. iconic behavior, honestly.
but here's the tea: if the product ID isn't available, this function just returns 0. like, zero, nada, nothing. don't come for it, it tried its best. ๐ซถ
๐ FUNCTION PARAMETERS ๐
gamepadโ the gamepad object you wanna query. that's the one. the main character. ๐
โญ RETURN VALUE โญ
Returns the USB product ID, or zero if it's unavailable. simple as that, periodt. ๐
๐ THREAD SAFETY ๐
it is safe to call this function from any thread. yes bestie, ANY thread. go wild. ๐งโจ
๐ AVAILABILITY ๐
this function has been available since SDL 3.2.0. it's been here, serving looks, since day one. ๐
๐ SEE ALSO ๐
and that's the whole vibe, bestie. go forth and query those product IDs responsibly. ๐๐ธ๐ฆ
โ brought to you by Simple Directmedia Layer, version SDL 3.4.18, page SDL_GetGamepadProduct(3). mwah. ๐โจ
๐ฆ 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