UI: Add option for only one fullscreen projector per screen
This option is added for users who want to have only one projector on a screen and want to save gpu resources.
This commit is contained in:
parent
54a808c34a
commit
6a0348cf64
4 changed files with 29 additions and 0 deletions
|
|
@ -8431,6 +8431,17 @@ OBSProjector *OBSBasic::OpenProjector(obs_source_t *source, int monitor,
|
|||
if (monitor > 9 || monitor > QGuiApplication::screens().size() - 1)
|
||||
return nullptr;
|
||||
|
||||
bool closeProjectors = config_get_bool(GetGlobalConfig(), "BasicWindow",
|
||||
"CloseExistingProjectors");
|
||||
|
||||
if (closeProjectors && monitor > -1) {
|
||||
for (size_t i = projectors.size(); i > 0; i--) {
|
||||
size_t idx = i - 1;
|
||||
if (projectors[idx]->GetMonitor() == monitor)
|
||||
DeleteProjector(projectors[idx]);
|
||||
}
|
||||
}
|
||||
|
||||
OBSProjector *projector =
|
||||
new OBSProjector(nullptr, source, monitor, type);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue