SDL_EnableScreenSaver(3)
β¨ SDL_EnableScreenSaver(3) β¨
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, this one's called SDL_EnableScreenSaver and it's genuinely so simple you'll be done in like ten seconds π
πΈ NAME πΈ
SDL_EnableScreenSaver β let the screen get blanked by a screen saver again. yes girl, it's the "go ahead and nap, bestie" button π€
π SYNOPSIS π
#include <SDL3/SDL_video.h>
bool SDL_EnableScreenSaver(void);
no arguments, no drama, she takes nothing and returns a bool. iconic behavior honestly π«Ά
π RETURN VALUE π
returns true on success and false on failure. and if it fails? don't just sit there wondering, call SDL_GetError() for more information, she'll tell you what went wrong π
π§ THREAD SAFETY π§
β οΈ this function should only be called on the main thread. do not try to be cute and call it from a worker thread, the main thread is the main character here, periodt π
π AVAILABILITY π
this function is available since SDL 3.2.0. so if you're on something older, no she's not there yet, sorry babe π
β SEE ALSO β
SDL_DisableScreenSaver(3)β the other half of this duo, go read her tooSDL_ScreenSaverEnabled(3)β for when you need a lil vibe check on the current state
and that's the whole page, no cap π it's giving short and sweet. this was Simple Directmedia Layer, SDL 3.4.18, and your girl SDL_EnableScreenSaver(3) signing off πβ¨ bye bestie, go enable that screen saver π¦
π¦ 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