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.

This commit is contained in:
Adam Honse
2025-07-26 02:36:38 -05:00
parent faaf2009b6
commit d59138363e

View File

@@ -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()