diff options
| author | bunnei <bunneidev@gmail.com> | 2019-09-14 00:46:18 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-14 00:46:18 -0400 |
| commit | ddfdeea3af1346fb7034896f55f7b8ddfd43f1d3 (patch) | |
| tree | 33149c3762c71fa42d4fa9a38efafeff3c655d8c /src/core/hle/service/acc/profile_manager.cpp | |
| parent | 3cc27e4ddaf6a8c7449b2c2b7c8d9aa7fbf248ad (diff) | |
| parent | 471b2a42117851aec46467a4b6b59ce6f5f6f421 (diff) | |
Merge pull request #2667 from DarkLordZach/profile-editor
acc: Implement IProfileEditor interface and 'Store'/'StoreWithImage' commands
Diffstat (limited to 'src/core/hle/service/acc/profile_manager.cpp')
| -rw-r--r-- | src/core/hle/service/acc/profile_manager.cpp | 11 |
1 files changed, 11 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", |
