summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/acc/profile_manager.cpp11
-rw-r--r--src/core/hle/service/acc/profile_manager.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/src/core/hle/service/acc/profile_manager.cpp b/src/core/hle/service/acc/profile_manager.cpp
index 49aa5908b..8f9986326 100644
--- a/src/core/hle/service/acc/profile_manager.cpp
+++ b/src/core/hle/service/acc/profile_manager.cpp
@@ -305,6 +305,17 @@ bool ProfileManager::SetProfileBase(UUID uuid, const ProfileBase& profile_new) {
305 return true; 305 return true;
306} 306}
307 307
308bool ProfileManager::SetProfileBaseAndData(Common::UUID uuid, const ProfileBase& profile_new,
309 const ProfileData& data_new) {
310 const auto index = GetUserIndex(uuid);
311 if (index.has_value() && SetProfileBase(uuid, profile_new)) {
312 profiles[*index].data = data_new;
313 return true;
314 }
315
316 return false;
317}
318
308void ProfileManager::ParseUserSaveFile() { 319void ProfileManager::ParseUserSaveFile() {
309 FileUtil::IOFile save(FileUtil::GetUserPath(FileUtil::UserPath::NANDDir) + 320 FileUtil::IOFile save(FileUtil::GetUserPath(FileUtil::UserPath::NANDDir) +
310 ACC_SAVE_AVATORS_BASE_PATH + "profiles.dat", 321 ACC_SAVE_AVATORS_BASE_PATH + "profiles.dat",
diff --git a/src/core/hle/service/acc/profile_manager.h b/src/core/hle/service/acc/profile_manager.h
index fd7abb541..5a6d28925 100644
--- a/src/core/hle/service/acc/profile_manager.h
+++ b/src/core/hle/service/acc/profile_manager.h
@@ -91,6 +91,8 @@ public:
91 91
92 bool RemoveUser(Common::UUID uuid); 92 bool RemoveUser(Common::UUID uuid);
93 bool SetProfileBase(Common::UUID uuid, const ProfileBase& profile_new); 93 bool SetProfileBase(Common::UUID uuid, const ProfileBase& profile_new);
94 bool SetProfileBaseAndData(Common::UUID uuid, const ProfileBase& profile_new,
95 const ProfileData& data_new);
94 96
95private: 97private:
96 void ParseUserSaveFile(); 98 void ParseUserSaveFile();