Hide outdated video condition options

The "throttle" and "reduce matching latency" optiohns were introduced
before "short circuit evaluation" was available and are now outdated.

Both don't behave as expected with this option enabled.
The throttling effect can be better achieved with an additional "Timer"
condition.
This commit is contained in:
WarmUpTill
2025-05-11 19:18:57 +02:00
committed by WarmUpTill
parent 98260b25a1
commit 7ec95e33eb
2 changed files with 20 additions and 3 deletions

View File

@@ -234,8 +234,9 @@ void MacroConditionVideo::GetScreenshot(bool blocking)
_areaParameters.area.width,
_areaParameters.area.height);
}
new (&_screenshotData) Screenshot(source, screenshotArea, blocking,
GetIntervalValue());
const int timeout = GetIntervalValue() < 300 ? 300 : GetIntervalValue();
new (&_screenshotData)
Screenshot(source, screenshotArea, blocking, timeout);
obs_source_release(source);
_getNextScreenshot = false;
}
@@ -1560,6 +1561,17 @@ void MacroConditionVideoEdit::SetWidgetVisibility()
_patternMatchModeLayout,
_entryData->_patternMatchParameters.useForChangedCheck);
}
// TODO:
// Remove "reduce matching latency" and "reduce cpu load" options as they
// have become superfluous with short circuit evaluation
if (!_entryData->_throttleEnabled) {
SetLayoutVisible(_throttleControlLayout, false);
}
if (_entryData->_blockUntilScreenshotDone) {
_reduceLatency->hide();
}
Resize();
}