SDL_GetNumJoystickButtons(3)
π SDL_GetNumJoystickButtons π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where today's main character is SDL_GetNumJoystickButtons β she's the one who tells you how many buttons your joystick is serving. no cap.
β¨ NAME β¨
SDL_GetNumJoystickButtons β get the number of buttons on a joystick. that's it. that's the whole job. and she ate. π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_joystick.h>
int SDL_GetNumJoystickButtons(SDL_Joystick *joystick);
π FUNCTION PARAMETERS π
joystickβ anSDL_Joystickstructure containing joystick information. like, hand her the joystick you're curious about and she'll do the rest, fr fr.
π¦ RETURN VALUE π¦
She returns the number of buttons on success, or -1 on failure. and if she fails? call SDL_GetError() for more info, because she's not gonna explain herself unprompted. π
π₯ THREAD SAFETY π₯
It is safe to call this function from any thread. yes queen, thread-safe, go wild, no vibe check needed. π«Ά
β AVAILABILITY β
This function is available since SDL 3.2.0. so if you're on something older, bestie, it's giving nothing. upgrade. β¨
π SEE ALSO π
SDL_GetJoystickButton(3)SDL_GetNumJoystickAxes(3)SDL_GetNumJoystickBalls(3)SDL_GetNumJoystickHats(3)
go read those too, they're all part of the same iconic friend group. π
and that's the whole page, bestie!! this manual page came to you from Simple Directmedia Layer, version SDL 3.4.18 β iconic behavior from the SDL girlies, as always. 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