mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
UI: Only inhibit when active or if projector open
Having sleep or screensavers inhibited at all times was causing some annoyances for people. Sleep/screensavers are now only inhibited when the program is active or when a projector is open.
This commit is contained in:
+9
-1
@@ -524,7 +524,15 @@ bool OBSApp::InitTheme()
|
||||
OBSApp::OBSApp(int &argc, char **argv, profiler_name_store_t *store)
|
||||
: QApplication(argc, argv),
|
||||
profilerNameStore(store)
|
||||
{}
|
||||
{
|
||||
sleepInhibitor = os_inhibit_sleep_create("OBS Video/audio");
|
||||
}
|
||||
|
||||
OBSApp::~OBSApp()
|
||||
{
|
||||
os_inhibit_sleep_set_active(sleepInhibitor, false);
|
||||
os_inhibit_sleep_destroy(sleepInhibitor);
|
||||
}
|
||||
|
||||
static void move_basic_to_profiles(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user