Enable variable support

This commit is contained in:
WarmUpTill
2023-02-06 19:48:23 +01:00
committed by WarmUpTill
parent 83c72ebba5
commit f34d1fe081
2 changed files with 6 additions and 1 deletions

View File

@@ -293,6 +293,7 @@ bool MacroConditionVideo::CheckOCR()
return match.hasMatch();
}
SetVariableValue(text);
return text == std::string(_ocrParamters.text);
}
@@ -305,6 +306,10 @@ bool MacroConditionVideo::Compare()
_areaParameters.area.height);
}
if (_condition != VideoCondition::OCR) {
SetVariableValue("");
}
switch (_condition) {
case VideoCondition::MATCH:
return _screenshotData.image == _matchImage;

View File

@@ -22,7 +22,7 @@ class PreviewDialog;
class MacroConditionVideo : public MacroCondition {
public:
MacroConditionVideo(Macro *m) : MacroCondition(m){};
MacroConditionVideo(Macro *m) : MacroCondition(m, true){};
bool CheckCondition();
bool Save(obs_data_t *obj) const;
bool Load(obs_data_t *obj);