mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-10-02 07:14:46 -04:00
[next] SDK v6: Implement client and server flags to indicate capabilities and...
This commit is contained in:
1 parent
70876193cf
commit
7b7f0aa0fe
8 files changed
+306
-41
No files matched your search
+5
-4
@@ -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();
|
||||
|
||||
|
||||
Reference in new issue
Block a user