mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-24 14:35:01 -04:00
Start server before detecting devices
This commit is contained in:
@@ -1780,6 +1780,22 @@ void ResourceManager::InitCoroutine()
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Start server if requested |
|
||||
\*-----------------------------------------------------*/
|
||||
if(start_server)
|
||||
{
|
||||
detection_percent = 0;
|
||||
detection_string = "Starting server";
|
||||
DetectionProgressChanged();
|
||||
|
||||
GetServer()->StartServer();
|
||||
if(!GetServer()->GetOnline())
|
||||
{
|
||||
LOG_DEBUG("[ResourceManager] Server failed to start");
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Perform actual detection if enabled |
|
||||
| Done in the same thread (InitThread), as we need to |
|
||||
@@ -1802,22 +1818,6 @@ void ResourceManager::InitCoroutine()
|
||||
ProcessPostDetection();
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Start server if requested |
|
||||
\*-----------------------------------------------------*/
|
||||
if(start_server)
|
||||
{
|
||||
detection_percent = 100;
|
||||
detection_string = "Starting server";
|
||||
DetectionProgressChanged();
|
||||
|
||||
GetServer()->StartServer();
|
||||
if(!GetServer()->GetOnline())
|
||||
{
|
||||
LOG_DEBUG("[ResourceManager] Server failed to start");
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Process command line arguments after detection only |
|
||||
| if the pre-detection parsing indicated it should be |
|
||||
|
||||
Reference in New Issue
Block a user