Rework handling of NetworkClient callbacks to route them through ResourceManager and move connection of saved clients to after autoconnection of local client in InitCoroutine

This commit is contained in:
Adam Honse 2025-07-12 22:49:14 -05:00
parent a30617d971
commit d8b9159125
4 changed files with 84 additions and 42 deletions

View file

@ -41,12 +41,9 @@ OpenRGBClientInfoPage::OpenRGBClientInfoPage(QWidget *parent) :
ui->ClientPortValue->setText(QString::number(OPENRGB_SDK_PORT));
/*-----------------------------------------------------*\
| Register callbacks for existing clients |
| Register callbacks with resource manager |
\*-----------------------------------------------------*/
for(unsigned int client_idx = 0; client_idx < ResourceManager::get()->GetClients().size(); client_idx++)
{
ResourceManager::get()->GetClients()[client_idx]->RegisterClientInfoChangeCallback(UpdateInfoCallback, this);
}
ResourceManager::get()->RegisterClientInfoChangeCallback(UpdateInfoCallback, this);
/*-----------------------------------------------------*\
| Update the information view |