SDL_GetJoystickType(3)
๐ SDL_GetJoystickType(3) ๐
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where we answer the question you've been lowkey dying to ask: what KIND of joystick is this?? ๐ฎโจ
โจ NAME โจ
SDL_GetJoystickType โ get the type of an opened joystick.
like. it's already open. it's already in your hands. and now we're gonna find out what it actually is. main character energy fr. ๐
๐ธ SYNOPSIS ๐ธ
#include <SDL3/SDL_joystick.h>
SDL_JoystickType SDL_GetJoystickType(SDL_Joystick *joystick);
there it is. one function. one job. no cap. ๐
๐ FUNCTION PARAMETERS ๐
joystickโ theSDL_Joystickyou got fromSDL_OpenJoystick(). yeah, that one. the one you already opened. this function is not out here opening anything for you, it's just here to look. ๐
๐ฆ RETURN VALUE ๐ฆ
it hands you back the SDL_JoystickType of the joystick you selected. that's it. that's the whole gift. ๐
๐ THREAD SAFETY ๐
you can call this from any thread. literally any of them. it's giving unbothered, it's giving safe, it's giving "call me whenever, bestie". no locks, no drama, no stress. ๐ซถ
โญ AVAILABILITY โญ
this little icon has been around since SDL 3.2.0. so if you're on anything olderโฆ babe, why. ๐ญ
๐ SEE ALSO ๐
SDL_GetJoystickTypeForID(3)โ same vibe, but you're working with an ID instead of an opened joystick. iykyk. โจ
ok but fr fr, don't forget: this one needs an already-opened SDL_Joystick. if you haven't opened it yet, this function is gonna have nothing to say to you. ๐
and that's the whole page, bestie!! brought to you by Simple Directmedia Layer ๐ SDL 3.4.18 โ go check your joystick type, you iconic legend, and slay the rest of your day. periodt. ๐โจ๐ฆ
๐ฆ 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