SDL_ScreenSaverEnabled(3)
π SDL_ScreenSaverEnabled(3) π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the man pages β this one is a lil cutie from <SDL3/SDL_video.h> and it's literally just you asking the library "hey, is the screensaver on rn?" π¦
β¨ NAME β¨
SDL_ScreenSaverEnabled β check whether the screensaver is currently enabled.
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_video.h>
bool SDL_ScreenSaverEnabled(void);
no args, no drama, just vibes π
π DESCRIPTION π
so here's the tea: the screensaver is disabled by default. yes, by default SDL is out here keeping your screen awake like it's got main character energy and refuses to nap. π
and if that default isn't giving what you need, you can change it with the hint SDL_HINT_VIDEO_ALLOW_SCREENSAVER. that's your little dial to flip the whole vibe. β¨
π RETURN VALUE π
trueβ the screensaver is enabled πfalseβ the screensaver is disabled π
that's it, that's the whole answer, no hidden lore.
π§ THREAD SAFETY π§
bestie. listen. this function should only be called on the main thread. do not be out here calling it from a side thread, that is not the move, fr fr. π
β AVAILABILITY β
this function is available since SDL 3.2.0. so if you're on something older, it's giving nothing, sorry. π
π SEE ALSO π
go read those two, they're the whole friend group π«Ά
and that's the page!! brought to you by the fine folks at Simple Directmedia Layer, running SDL 3.4.18 β mwah, slay, periodt, go keep your screen awake responsibly πβ¨π
π¦ 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