mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-04-04 14:14:17 -04:00
Fix crash on close while detecting devices
This commit is contained in:
committed by
Adam Honse
parent
06b2cd87c6
commit
f8af9980fd
@@ -106,6 +106,7 @@ void ResourceManager::DetectDevices()
|
||||
|
||||
void ResourceManager::DetectDevicesThreadFunction()
|
||||
{
|
||||
DetectDeviceMutex.lock();
|
||||
unsigned int prev_count = 0;
|
||||
float percent = 0.0f;
|
||||
|
||||
@@ -175,4 +176,12 @@ void ResourceManager::DetectDevicesThreadFunction()
|
||||
}
|
||||
|
||||
profile_manager.LoadSizeFromProfile("sizes.ors");
|
||||
|
||||
DetectDeviceMutex.unlock();
|
||||
}
|
||||
|
||||
void ResourceManager::WaitForDeviceDetection()
|
||||
{
|
||||
DetectDeviceMutex.lock();
|
||||
DetectDeviceMutex.unlock();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user