[fix] scope sleep inhibition to active screen sharing, refs #123

This commit is contained in:
dijunkun
2026-10-24 01:24:38 +08:00
parent 1d465239cf
commit 182899d238
7 changed files with 323 additions and 7 deletions
@@ -1225,6 +1225,9 @@ bool GuiApplication::InitializeSDL() {
"windows while retaining Wayland portal capture and input");
}
#endif
// SDL disables the screensaver by default. A background remote desktop app
// should leave automatic display sleep under the user's system settings.
SDL_SetHint(SDL_HINT_VIDEO_ALLOW_SCREENSAVER, "1");
if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO)) {
LOG_ERROR("SDL initialization failed: {}", SDL_GetError());
return false;