SDL_GetJoystickTypeForID(3)
๐ SDL_GetJoystickTypeForID ๐
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, this one is literally called SDL_GetJoystickTypeForID and it's giving "who is this joystick and what IS she" energy โจ
๐ธ NAME ๐ธ
SDL_GetJoystickTypeForID โ get the type of a joystick, if available. no cap, that's the whole job ๐ฎ
๐ฆ SYNOPSIS ๐ฆ
#include <SDL3/SDL_joystick.h>
SDL_JoystickType SDL_GetJoystickTypeForID(SDL_JoystickID instance_id);
๐ DESCRIPTION ๐
the tea is: you can call this before any joysticks are opened. like, before. zero setup, zero open, just vibes and an ID. it's giving main character energy because it doesn't need the whole joystick subsystem awake first ๐ซถ
๐ FUNCTION PARAMETERS ๐
instance_idโ the joystick instance ID. that's it, that's the whole parameter, she's lowkey simple ๐
โญ RETURN VALUE โญ
returns the SDL_JoystickType of the selected joystick. iconic. correct. slay.
but bestie, if you hand her an invalidinstance_id, she doesn't guess, she doesn't improvise โ she returnsSDL_JOYSTICK_TYPE_UNKNOWN. so if you get that back, double check your ID, fr fr ๐ญ
๐ง THREAD SAFETY ๐ง
it is safe to call this function from any thread. any thread. all the threads. go wild, she can handle it ๐ฅ
๐ AVAILABILITY ๐
this function is available since SDL 3.2.0. if you're on something older, sorry bestie, she wasn't born yet ๐
๐ SEE ALSO ๐
and that's the whole page, periodt ๐
Simple Directmedia Layer โ SDL 3.4.18 โ SDL_GetJoystickTypeForID(3) ๐ฆ๐ go check the type of that joystick, you absolute icon โจ
๐ฆ 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