From 75899f973bdbbfddbb523cb5cf42b9a75d7fddf2 Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Thu, 6 Aug 2020 13:14:21 -0500 Subject: [PATCH] Load sizes after detection is complete --- ResourceManager.cpp | 6 +++++- main.cpp | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ResourceManager.cpp b/ResourceManager.cpp index a775d813..0179d523 100644 --- a/ResourceManager.cpp +++ b/ResourceManager.cpp @@ -1,5 +1,5 @@ #include "ResourceManager.h" - +#include "ProfileManager.h" std::unique_ptr ResourceManager::instance; @@ -102,6 +102,8 @@ void ResourceManager::DetectDevicesThreadFunction() unsigned int prev_count = 0; float percent = 0.0f; + ProfileManager profile_manager(rgb_controllers); + /*-------------------------------------------------*\ | Start at 0% detection progress | \*-------------------------------------------------*/ @@ -158,4 +160,6 @@ void ResourceManager::DetectDevicesThreadFunction() detection_percent = percent * 100.0f; } + + profile_manager.LoadSizeFromProfile("sizes.ors"); } diff --git a/main.cpp b/main.cpp index 24ce2142..93ee28bc 100644 --- a/main.cpp +++ b/main.cpp @@ -157,8 +157,6 @@ int main(int argc, char* argv[]) ResourceManager::get()->DetectDevices(); } - profile_manager.LoadSizeFromProfile("sizes.ors"); - /*---------------------------------------------------------*\ | Process command line arguments | \*---------------------------------------------------------*/