Add option to allow PC to sleep while streaming

This commit is contained in:
Cameron Gutman
2022-03-16 21:48:56 -05:00
parent 73d84dc13f
commit 97d8274911
5 changed files with 30 additions and 2 deletions

View File

@@ -1468,8 +1468,10 @@ void Session::execInternal()
// on macOS.
SDL_StopTextInput();
// Disable the screen saver
SDL_DisableScreenSaver();
// Disable the screen saver if requested or running as embedded platform
if (m_Preferences->keepAwake || !WMUtils::isRunningDesktopEnvironment()) {
SDL_DisableScreenSaver();
}
// Hide Qt's fake mouse cursor on EGLFS systems
if (QGuiApplication::platformName() == "eglfs") {