SDL_GetJoystickFromID(3)
π NAME π
SDL_GetJoystickFromID β bestie, this is the lil' function that hands you back the SDL_Joystick that's tied to a specific instance ID, but ONLY if that joystick has already been opened. Not opened yet? She's not gonna dig it out of the void for you. π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_joystick.h>
SDL_Joystick * SDL_GetJoystickFromID(SDL_JoystickID instance_id);
π FUNCTION PARAMETERS π
instance_idβ the instance ID you want theSDL_Joystickfor. That's it, that's the whole vibe check. π¦
πΈ RETURN VALUE πΈ
On success you get an SDL_Joystick back. π
On failure β OR if that joystick just hasn't been opened yet β you get NULL. And when you get that NULL, do the responsible thing and call SDL_GetError() for more information, because she will absolutely tell you what went wrong. π₯
π THREAD SAFETY π
It is safe to call this function from any thread. Go off, multithreaded queen. π
β AVAILABILITY β
This function is available since SDL 3.2.0. If you're on anything older, sorry bestie, no cap, it's not there. π
okay that's the whole page, periodt π«Ά thanks for reading, this was brought to you by Simple Directmedia Layer, running SDL 3.4.18 β mwah, catch you in the next manpage, 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