[next] SDK v6: Implement client and server flags to indicate capabilities and...

This commit is contained in:
Adam Honse
2026-01-28 11:49:59 -06:00
parent feb1813e4e
commit 0913ae719e
8 changed files with 299 additions and 41 deletions

View File

@@ -320,7 +320,7 @@ unsigned int ResourceManager::GetLocalClientProtocolVersion()
bool ResourceManager::IsLocalClient()
{
return(auto_connection_active);
return(auto_connection_active && (auto_connection_client != NULL) && auto_connection_client->GetLocal());
}
/*---------------------------------------------------------*\
@@ -379,7 +379,7 @@ bool ResourceManager::GetDetectionEnabled()
unsigned int ResourceManager::GetDetectionPercent()
{
if(auto_connection_active && auto_connection_client != NULL)
if(auto_connection_active && (auto_connection_client != NULL) && auto_connection_client->GetLocal())
{
return auto_connection_client->DetectionManager_GetDetectionPercent();
}
@@ -391,7 +391,7 @@ unsigned int ResourceManager::GetDetectionPercent()
std::string ResourceManager::GetDetectionString()
{
if(auto_connection_active && auto_connection_client != NULL)
if(auto_connection_active && (auto_connection_client != NULL) && auto_connection_client->GetLocal())
{
return auto_connection_client->DetectionManager_GetDetectionString();
}
@@ -408,7 +408,7 @@ void ResourceManager::RescanDevices()
| instance is the local server, so send rescan requests |
| to the automatic local connection client |
\*-----------------------------------------------------*/
if(auto_connection_active && auto_connection_client != NULL)
if(auto_connection_active && (auto_connection_client != NULL) && auto_connection_client->GetLocal())
{
auto_connection_client->SendRequest_RescanDevices();
}
@@ -583,6 +583,7 @@ bool ResourceManager::AttemptLocalConnection()
std::string titleString = "OpenRGB ";
titleString.append(VERSION_STRING);
auto_connection_client->RequestLocalClient(true);
auto_connection_client->SetName(titleString.c_str());
auto_connection_client->StartClient();