sdlScreenSaverEnabled function
Check whether the screensaver is currently enabled.
The screensaver is disabled by default.
The default can also be changed using SDL_HINT_VIDEO_ALLOW_SCREENSAVER
.
\returns true if the screensaver is enabled, false if it is disabled.
\threadsafety This function should only be called on the main thread.
\since This function is available since SDL 3.1.3.
\sa SDL_DisableScreenSaver \sa SDL_EnableScreenSaver
extern SDL_DECLSPEC bool SDLCALL SDL_ScreenSaverEnabled(void)
Implementation
bool sdlScreenSaverEnabled() {
final sdlScreenSaverEnabledLookupFunction =
libSdl3.lookupFunction<Uint8 Function(), int Function()>(
'SDL_ScreenSaverEnabled');
return sdlScreenSaverEnabledLookupFunction() == 1;
}