Fix profile loading

This commit is contained in:
Adam Honse 2020-10-09 00:02:57 -05:00
parent c1c66c37d5
commit b19dfdb010
2 changed files with 9 additions and 4 deletions

View file

@ -145,7 +145,7 @@ std::vector<RGBController*> ProfileManager::LoadProfileToList
return(temp_controllers);
}
void ProfileManager::LoadDeviceFromListWithOptions
bool ProfileManager::LoadDeviceFromListWithOptions
(
std::vector<RGBController*>& temp_controllers,
std::vector<bool>& temp_controller_used,
@ -240,10 +240,12 @@ void ProfileManager::LoadDeviceFromListWithOptions
temp_controller_used[temp_index] = true;
break;
return(true);
}
}
}
return(false);
}
bool ProfileManager::LoadProfileWithOptions
@ -280,7 +282,10 @@ bool ProfileManager::LoadProfileWithOptions
\*---------------------------------------------------------*/
for(std::size_t controller_index = 0; controller_index < controllers.size(); controller_index++)
{
LoadDeviceFromListWithOptions(temp_controllers, temp_controller_used, controllers[controller_index], load_size, load_settings);
if(LoadDeviceFromListWithOptions(temp_controllers, temp_controller_used, controllers[controller_index], load_size, load_settings))
{
ret_val = true;
}
}
/*---------------------------------------------------------*\

View file

@ -15,7 +15,7 @@ public:
std::vector<std::string> profile_list;
void LoadDeviceFromListWithOptions
bool LoadDeviceFromListWithOptions
(
std::vector<RGBController*>& temp_controllers,
std::vector<bool>& temp_controller_used,