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:
@@ -25,12 +25,15 @@ OBSProjector::OBSProjector(QWidget *widget, obs_source_t *source_)
|
||||
};
|
||||
|
||||
connect(this, &OBSQTDisplay::DisplayCreated, addDrawCallback);
|
||||
|
||||
App()->IncrementSleepInhibition();
|
||||
}
|
||||
|
||||
OBSProjector::~OBSProjector()
|
||||
{
|
||||
if (source)
|
||||
obs_source_dec_showing(source);
|
||||
App()->DecrementSleepInhibition();
|
||||
}
|
||||
|
||||
void OBSProjector::Init(int monitor)
|
||||
|
||||
Reference in New Issue
Block a user