mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-22 01:44:49 -05:00
Dynamically increase delay between screenshots up to one second
Otherwise users with a very low switcher interval might not be able to use the preview dialog at all
This commit is contained in:
parent
8ad3563963
commit
5f3a3dd5cf
|
|
@ -198,12 +198,21 @@ void PreviewDialog::CheckForMatchLoop()
|
|||
if (_stop || isHidden()) {
|
||||
return;
|
||||
}
|
||||
if (!screenshot.done || !_video.ValidSelection()) {
|
||||
if (!_video.ValidSelection()) {
|
||||
_statusLabel->setText(obs_module_text(
|
||||
"AdvSceneSwitcher.condition.video.screenshotFail"));
|
||||
_imageLabel->setPixmap(QPixmap());
|
||||
continue;
|
||||
}
|
||||
if (!screenshot.done) {
|
||||
_statusLabel->setText(obs_module_text(
|
||||
"AdvSceneSwitcher.condition.video.screenshotFail"));
|
||||
_imageLabel->setPixmap(QPixmap());
|
||||
if (_delay < 1000) {
|
||||
_delay += 50;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (screenshot.image.width() == 0 ||
|
||||
screenshot.image.height() == 0) {
|
||||
_statusLabel->setText(obs_module_text(
|
||||
|
|
@ -220,6 +229,8 @@ void PreviewDialog::CheckForMatchLoop()
|
|||
_areaParams.area.height);
|
||||
}
|
||||
MarkMatch(screenshot.image);
|
||||
} else {
|
||||
_statusLabel->setText("");
|
||||
}
|
||||
_imageLabel->setPixmap(QPixmap::fromImage(screenshot.image));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user