sdlEnableScreenSaver function video

bool sdlEnableScreenSaver()

Allow the screen to be blanked by a screen saver.

\returns true on success or false on failure; call SDL_GetError() for more information.

\threadsafety This function should only be called on the main thread.

\since This function is available since SDL 3.2.0.

\sa SDL_DisableScreenSaver \sa SDL_ScreenSaverEnabled

extern SDL_DECLSPEC bool SDLCALL SDL_EnableScreenSaver(void)

Implementation

bool sdlEnableScreenSaver() {
  final sdlEnableScreenSaverLookupFunction = _libSdl
      .lookupFunction<Uint8 Function(), int Function()>(
        'SDL_EnableScreenSaver',
      );
  return sdlEnableScreenSaverLookupFunction() == 1;
}