refactor: move preventsleep option into CoreArgs

This commit is contained in:
sithlord48
2025-08-23 16:10:13 -04:00
committed by Chris Rizzitello
parent a8348b1ccb
commit c2ee366e23
14 changed files with 67 additions and 36 deletions

View File

@ -6,6 +6,8 @@
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
*/
#include "common/Settings.h" // must include first
#include "platform/XWindowsScreen.h"
#include "arch/Arch.h"
@ -141,7 +143,7 @@ XWindowsScreen::XWindowsScreen(
}
// disable sleep if the flag is set
if (App::instance().argsBase().m_preventSleep) {
if (Settings::value(Settings::Core::PreventSleep).toBool()) {
m_powerManager.disableSleep();
}