SDL_GetJoystickName(3)
๐ SDL_GetJoystickName ๐
okay so bestie, welcome to SDL_GetJoystickName(3), one of the SDL3 FUNCTIONS โจ โ it's giving "who even IS this controller" energy and honestly? obsessed.
โจ NAME โจ
SDL_GetJoystickName โ get the implementation dependent name of a joystick ๐ฎ
๐ฆ SYNOPSIS ๐ฆ
#include <SDL3/SDL_joystick.h>
const char * SDL_GetJoystickName(SDL_Joystick *joystick);
๐ธ FUNCTION PARAMETERS ๐ธ
joystickโ theSDL_Joystickyou got fromSDL_OpenJoystick(). like, the one you already opened, girl. you can't just ask a stranger their name ๐
๐ RETURN VALUE ๐
Returns the name of the selected joystick ๐ซถ
But listen โ if no name can be found, this function returns NULL. and then? you go call SDL_GetError() for more info, because bestie we do not suffer in silence ๐ญ
๐ง THREAD SAFETY ๐ง
It is safe to call this function from any thread. periodt. no notes, no drama, no mutexes needed ๐ฅ
โญ AVAILABILITY โญ
This function is available since SDL 3.2.0 โ so if you're on anything older, it's a no from her, sorry babe ๐
๐ SEE ALSO ๐
SDL_GetJoystickNameForID(3)โ the sibling, the icon, the other way to ask ๐
not me hyping up a getter function but like... it's literally how you find out what your controller is called. main character energy fr fr ๐
mwah ๐ that's the whole page, bestie โ brought to you by the fine folks at Simple Directmedia Layer, SDL 3.4.18, and yes the date is on the original footer too, iykyk. go forth and name some joysticks ๐ฆโจ
๐ฆ 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