diff --git a/ProfileManager.cpp b/ProfileManager.cpp index 7a237c75..457f8b17 100644 --- a/ProfileManager.cpp +++ b/ProfileManager.cpp @@ -145,7 +145,7 @@ std::vector ProfileManager::LoadProfileToList return(temp_controllers); } -void ProfileManager::LoadDeviceFromListWithOptions +bool ProfileManager::LoadDeviceFromListWithOptions ( std::vector& temp_controllers, std::vector& 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; + } } /*---------------------------------------------------------*\ diff --git a/ProfileManager.h b/ProfileManager.h index 8a7c150b..96b0c4f7 100644 --- a/ProfileManager.h +++ b/ProfileManager.h @@ -15,7 +15,7 @@ public: std::vector profile_list; - void LoadDeviceFromListWithOptions + bool LoadDeviceFromListWithOptions ( std::vector& temp_controllers, std::vector& temp_controller_used,