mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-18 15:21:41 -05:00
Enable getting variable values from window condition
This commit is contained in:
@@ -45,6 +45,7 @@ bool MacroConditionWindow::CheckWindowTitleSwitchRegex(
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return match;
|
||||
}
|
||||
|
||||
@@ -56,11 +57,12 @@ bool foregroundWindowChanged()
|
||||
bool MacroConditionWindow::CheckCondition()
|
||||
{
|
||||
const std::string ¤tWindowTitle = switcher->currentTitle;
|
||||
SetVariableValue(currentWindowTitle);
|
||||
|
||||
std::vector<std::string> windowList;
|
||||
GetWindowList(windowList);
|
||||
|
||||
bool match = false;
|
||||
|
||||
if (std::find(windowList.begin(), windowList.end(), _window) !=
|
||||
windowList.end()) {
|
||||
match = CheckWindowTitleSwitchDirect(currentWindowTitle);
|
||||
@@ -69,7 +71,6 @@ bool MacroConditionWindow::CheckCondition()
|
||||
windowList);
|
||||
}
|
||||
match = match && (!_windowFocusChanged || foregroundWindowChanged());
|
||||
|
||||
return match;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
class MacroConditionWindow : public MacroCondition {
|
||||
public:
|
||||
MacroConditionWindow(Macro *m) : MacroCondition(m) {}
|
||||
MacroConditionWindow(Macro *m) : MacroCondition(m, true) {}
|
||||
bool CheckCondition();
|
||||
bool Save(obs_data_t *obj) const;
|
||||
bool Load(obs_data_t *obj);
|
||||
|
||||
Reference in New Issue
Block a user