From d59138363efac3ef1dcdfcf9ddcd6dd614767a21 Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Sat, 26 Jul 2025 02:36:38 -0500 Subject: [PATCH] Handle condition where detection finishes before OpenRGBDialog constructor finishes/has time to register detection end callback. Fixes plugins not loading when running OpenRGB as a background service. --- qt/OpenRGBDialog/OpenRGBDialog.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qt/OpenRGBDialog/OpenRGBDialog.cpp b/qt/OpenRGBDialog/OpenRGBDialog.cpp index 4eef0fd9..228dd0f1 100644 --- a/qt/OpenRGBDialog/OpenRGBDialog.cpp +++ b/qt/OpenRGBDialog/OpenRGBDialog.cpp @@ -539,6 +539,14 @@ OpenRGBDialog::OpenRGBDialog(QWidget *parent) : QMainWindow(parent), ui(new Ui:: \*-----------------------------------------------------*/ connect(qApp, &QCoreApplication::aboutToQuit, this, &OpenRGBDialog::handleAboutToQuit); + /*-----------------------------------------------------*\ + | Handle the condition where detection ended before we | + | finished initializing/registering detection callback | + \*-----------------------------------------------------*/ + if(ResourceManager::get()->GetDetectionPercent() >= 100) + { + onDetectionEnded(); + } } OpenRGBDialog::~OpenRGBDialog()