Fix crash on close while detecting devices

This commit is contained in:
Térence Clastres
2020-08-06 18:19:59 +02:00
committed by Adam Honse
parent 06b2cd87c6
commit f8af9980fd
4 changed files with 21 additions and 0 deletions

View File

@@ -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();
}