Clean up screen saver inhibition and apply setting change immediately.

This commit is contained in:
Jordan Woyak
2020-10-18 13:06:11 -05:00
parent fa83a3a114
commit 50ec747840
5 changed files with 33 additions and 48 deletions

View File

@ -107,6 +107,9 @@ bool PlatformWin32::Init()
ProcessEvents();
}
if (Config::Get(Config::MAIN_DISABLE_SCREENSAVER))
SetThreadExecutionState(ES_CONTINUOUS | ES_DISPLAY_REQUIRED | ES_SYSTEM_REQUIRED);
UpdateWindowPosition();
return true;
}