win-dshow: Fix issue with activating when not set to
When the windows video device source source is set to only activate when showing, it would still activate on first startup of the program even if it was in another scene and not showing anywhere to the user. This fixes that issue.
This commit is contained in:
parent
5845664a02
commit
c422d84d6e
@ -208,8 +208,14 @@ struct DShowInput {
|
||||
if (!thread)
|
||||
throw "Failed to create thread";
|
||||
|
||||
deactivateWhenNotShowing =
|
||||
obs_data_get_bool(settings, DEACTIVATE_WNS);
|
||||
|
||||
if (obs_data_get_bool(settings, "active")) {
|
||||
QueueAction(Action::Activate);
|
||||
bool showing = obs_source_showing(source);
|
||||
if (!deactivateWhenNotShowing || showing)
|
||||
QueueAction(Action::Activate);
|
||||
|
||||
active = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user