SDL_HasMouse(3)
π SDL_HasMouse π
okay bestie, quick vibe check β this one lives in the SDL3 FUNCTIONS section of the manual, so you already know it's a lil' utility queen. π
πΈ NAME πΈ
SDL_HasMouse β tells you whether a mouse is currently connected. that's it. that's the whole job. she's simple, she's iconic, she ate. π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_mouse.h>
bool SDL_HasMouse(void);
no arguments, no drama, just vibes and a bool. π¦
π«Ά RETURN VALUE π«Ά
- Returns
trueif a mouse is connected - Returns
falseotherwise
fr fr that's the entire return contract, no hidden lore. π
π§ THREAD SAFETY π§
β οΈ bestie listen. this function should only be called on the main thread. do not try to be cute and call it from a worker thread, it's giving chaos and we don't do that here. π
π AVAILABILITY π
this function is available since SDL 3.2.0. so if you're on something older, no mouse-checking for you, sorry babe π
π SEE ALSO π
SDL_GetMice(3)β go get the whole lineup of mice if you need the full roster, this is the glow-up companion read π
and that's the tea, bestie β¨ this page is from Simple Directmedia Layer, version SDL 3.4.18 β mwah, love that for us. ππ
π¦ 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