mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-04-04 22:24:12 -04:00
Use up-to-date controller list in profile manager
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
namespace fs = std::experimental::filesystem;
|
||||
|
||||
ProfileManager::ProfileManager(std::vector<RGBController *>& control, std::string config_dir) : controllers(control)
|
||||
ProfileManager::ProfileManager(std::string config_dir)
|
||||
{
|
||||
configuration_directory = config_dir;
|
||||
UpdateProfileList();
|
||||
@@ -22,6 +22,11 @@ ProfileManager::~ProfileManager()
|
||||
|
||||
bool ProfileManager::SaveProfile(std::string profile_name)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| Get the list of controllers from the resource manager |
|
||||
\*---------------------------------------------------------*/
|
||||
std::vector<RGBController *> controllers = ResourceManager::get()->GetRGBControllers();
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| If a name was entered, save the profile file |
|
||||
\*---------------------------------------------------------*/
|
||||
@@ -269,6 +274,11 @@ bool ProfileManager::LoadProfileWithOptions
|
||||
|
||||
std::string filename = configuration_directory + profile_name;
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Get the list of controllers from the resource manager |
|
||||
\*---------------------------------------------------------*/
|
||||
std::vector<RGBController *> controllers = ResourceManager::get()->GetRGBControllers();
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Open input file in binary mode |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user