mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-06-22 12:32:10 -05:00
Enable getting variable values from window condition
This commit is contained in:
parent
b12c25fdf4
commit
1c3ff927a5
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user