SDL_GetNumGamepadTouchpads(3)
β¨ SDL_GetNumGamepadTouchpads β¨
okay bestie, so this one lives in the SDL3 FUNCTIONS section of the manual and it's literally the cutest little question you can ask a controller: how many touchpads does this gamepad have?? π
Like, that's it. That's the whole function. And it ate. π
πΈ NAME πΈ
SDL_GetNumGamepadTouchpads β get the number of touchpads on a gamepad.
no cap, the name is doing exactly what it says on the tin. not me being obsessed with a function that has zero plot twists π
π¦ SYNOPSIS π¦
#include <SDL3/SDL_gamepad.h>
int SDL_GetNumGamepadTouchpads(SDL_Gamepad *gamepad);
π FUNCTION PARAMETERS π
gamepadβ a gamepad. π
that's the whole list. one (1) parameter. a single gamepad, handed to you like a little gift. she's lowkey mysterious about it in the docs but bestie, it's a gamepad. that's the vibe.
β¨ RETURN VALUE β¨
Returns number of touchpads. that's the number of touchpads, fr fr. count them. that's your answer. π
π§ THREAD SAFETY π§
It is safe to call this function from any thread. π«Ά
literally any thread. go feral. no locks, no stress, no "wait, am I allowed to do this here" panic spiral. main character energy from every thread simultaneously. π
β AVAILABILITY β
This function is available since SDL 3.2.0. π
so if you're on something older than that, she simply does not exist yet. ghosted. π
π SEE ALSO π
SDL_GetNumGamepadTouchpadFingers(3)β because once you know how many touchpads there are, obviously the next question is how many fingers each one can feel. the natural sequel. the season two. π¦
heads up bestie: knowing how many touchpads exist is step one. if you wanna actually read what those touchpads are doing, that SEE ALSO entry up there is your girl. π
mwah π that's the page! this lil cutie is brought to you by Simple Directmedia Layer and it's sitting pretty in the SDL 3.4.18 era of the docs. thanks for reading, love u, bye!! πβ¨πΈ
π¦ 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