99
1010namespace fs = std::experimental::filesystem;
1111
12- ProfileManager::ProfileManager (std::vector<RGBController *>& control, std:: string config_dir) : controllers(control )
12+ ProfileManager::ProfileManager (std::string config_dir)
1313{
1414 configuration_directory = config_dir;
1515 UpdateProfileList ();
@@ -22,6 +22,11 @@ ProfileManager::~ProfileManager()
2222
2323bool ProfileManager::SaveProfile (std::string profile_name)
2424{
25+ /* ---------------------------------------------------------*\
26+ | Get the list of controllers from the resource manager |
27+ \*---------------------------------------------------------*/
28+ std::vector<RGBController *> controllers = ResourceManager::get ()->GetRGBControllers ();
29+
2530 /* ---------------------------------------------------------*\
2631 | If a name was entered, save the profile file |
2732 \*---------------------------------------------------------*/
@@ -269,6 +274,11 @@ bool ProfileManager::LoadProfileWithOptions
269274
270275 std::string filename = configuration_directory + profile_name;
271276
277+ /* ---------------------------------------------------------*\
278+ | Get the list of controllers from the resource manager |
279+ \*---------------------------------------------------------*/
280+ std::vector<RGBController *> controllers = ResourceManager::get ()->GetRGBControllers ();
281+
272282 /* ---------------------------------------------------------*\
273283 | Open input file in binary mode |
274284 \*---------------------------------------------------------*/
0 commit comments