SDL_GetMouseNameForID(3)
π NAME π
SDL_GetMouseNameForID β bestie, this one gets the name of a mouse. That's it. That's the whole job. πβ¨
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_mouse.h>
const char * SDL_GetMouseNameForID(SDL_MouseID instance_id);
π DESCRIPTION π
Okay so real talk: you hand it a mouse, it hands you back a name. Iconic behaviour, honestly.
But heads up β if the mouse doesn't have a name, this function returns "". Like, the empty string. Not NULL. An empty little nothing of a string. Don't get it twisted, bestie π
π¦ FUNCTION PARAMETERS π¦
instance_idβ the mouse instance ID. That's the ID of the mouse you're asking about. Yes, the mouse. π
β¨ RETURN VALUE β¨
It returns the name of the selected mouse π β or NULL on failure, in which case you gotta call SDL_GetError() for more info. Like, go ask the error, she knows what happened. π
NULLmeans something went wrong.""means the mouse just doesn't have a name. Two completely different vibes, do not conflate them, iykyk.
π§ THREAD SAFETY π§
This function should only be called on the main thread. Main character energy only. If you're on some other thread trying to call this, no you're not. π
π AVAILABILITY π
This function has been available since SDL 3.2.0. So if you're on something older... girl. Upgrade. π
β SEE ALSO β
SDL_GetMice(3)β the whole squad. Get the entire mouse roster, not just one. π«Ά
And that's the tea, bestie β This page is from the Simple Directmedia Layer era, SDL 3.4.18 edition. Go name some mice, slay, 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