From e6b954e9e80a76f0351a7f565c6824a0a0e5d457 Mon Sep 17 00:00:00 2001 From: Bruno Herbelin Date: Fri, 4 Oct 2024 16:29:51 +0200 Subject: [PATCH] BugFix prevent busy init of checkerboard texture --- src/SourceControlWindow.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/SourceControlWindow.cpp b/src/SourceControlWindow.cpp index e97bf0e..4c5a505 100644 --- a/src/SourceControlWindow.cpp +++ b/src/SourceControlWindow.cpp @@ -19,6 +19,7 @@ #include #include +#include #include @@ -43,7 +44,7 @@ #include "SourceControlWindow.h" -#define CHECKER_RESOLUTION 6000 +#define CHECKER_RESOLUTION 5000 class Stream *checker_background_ = new Stream; typedef struct payload @@ -104,8 +105,10 @@ SourceControlWindow::SourceControlWindow() : WorkspaceWindow("SourceController") "videobalance saturation=0 contrast=1", CHECKER_RESOLUTION, CHECKER_RESOLUTION); checker_background_->play(false); - while (checker_background_->texture() == Resource::getTextureBlack()) + while (checker_background_->texture() == Resource::getTextureBlack()){ + std::this_thread::sleep_for (std::chrono::milliseconds(30)); checker_background_->update(); + } checker_background_->close(); }