summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-07-03 14:56:28 +0200
committerZach Hilman <zachhilman@gmail.com>2019-07-03 14:56:28 +0200
commit02560d64829282c78c725b7fc93d11110b8e076c (patch)
treef2c8680782853820af7ad749e9962edc7490bb2a /src
parentacc: Add IProfileCommon for IProfile and IProfileEditor (diff)
downloadyuzu-02560d64829282c78c725b7fc93d11110b8e076c.tar
yuzu-02560d64829282c78c725b7fc93d11110b8e076c.tar.gz
yuzu-02560d64829282c78c725b7fc93d11110b8e076c.tar.bz2
yuzu-02560d64829282c78c725b7fc93d11110b8e076c.tar.lz
yuzu-02560d64829282c78c725b7fc93d11110b8e076c.tar.xz
yuzu-02560d64829282c78c725b7fc93d11110b8e076c.tar.zst
yuzu-02560d64829282c78c725b7fc93d11110b8e076c.zip
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) {
return true;
}
+bool ProfileManager::SetProfileBaseAndData(Common::UUID uuid, const ProfileBase& profile_new,
+ const ProfileData& data_new) {
+ const auto index = GetUserIndex(uuid);
+ if (index.has_value() && SetProfileBase(uuid, profile_new)) {
+ profiles[*index].data = data_new;
+ return true;
+ }
+
+ return false;
+}
+
void ProfileManager::ParseUserSaveFile() {
FileUtil::IOFile save(FileUtil::GetUserPath(FileUtil::UserPath::NANDDir) +
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:
bool RemoveUser(Common::UUID uuid);
bool SetProfileBase(Common::UUID uuid, const ProfileBase& profile_new);
+ bool SetProfileBaseAndData(Common::UUID uuid, const ProfileBase& profile_new,
+ const ProfileData& data_new);
private:
void ParseUserSaveFile();