mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-22 01:44:49 -05:00
Enable getting variable values from process condition
This commit is contained in:
parent
ae6f0bc470
commit
f1cdab80a9
|
|
@ -22,6 +22,12 @@ bool MacroConditionProcess::CheckCondition()
|
|||
bool matches = runningProcesses.indexOf(QRegularExpression(proc)) != -1;
|
||||
bool focus = !_focus || isInFocus(proc);
|
||||
|
||||
if (IsReferencedInVars()) {
|
||||
std::string name;
|
||||
GetForegroundProcessName(name);
|
||||
SetVariableValue(name);
|
||||
}
|
||||
|
||||
return (equals || matches) && focus;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
class MacroConditionProcess : public MacroCondition {
|
||||
public:
|
||||
MacroConditionProcess(Macro *m) : MacroCondition(m) {}
|
||||
MacroConditionProcess(Macro *m) : MacroCondition(m, true) {}
|
||||
bool CheckCondition();
|
||||
bool Save(obs_data_t *obj) const;
|
||||
bool Load(obs_data_t *obj);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user