diff options
| author | 2018-10-09 21:49:06 -0400 | |
|---|---|---|
| committer | 2018-10-23 19:31:28 -0400 | |
| commit | aeffd4b436dceb798b4ffc1f8babb350a741280a (patch) | |
| tree | 5e58ed9cd4773f0fecfe87d80c8906f95b6780fd /src | |
| parent | settings: Add users and current_user settings and remove username (diff) | |
| download | yuzu-aeffd4b436dceb798b4ffc1f8babb350a741280a.tar.gz yuzu-aeffd4b436dceb798b4ffc1f8babb350a741280a.tar.xz yuzu-aeffd4b436dceb798b4ffc1f8babb350a741280a.zip | |
profile_manager: Load users from emulator settings
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/acc/profile_manager.cpp | 10 | ||||
| -rw-r--r-- | src/core/hle/service/acc/profile_manager.h | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/core/hle/service/acc/profile_manager.cpp b/src/core/hle/service/acc/profile_manager.cpp index bcb3475db..b4b4b52b7 100644 --- a/src/core/hle/service/acc/profile_manager.cpp +++ b/src/core/hle/service/acc/profile_manager.cpp | |||
| @@ -23,10 +23,12 @@ const UUID& UUID::Generate() { | |||
| 23 | } | 23 | } |
| 24 | 24 | ||
| 25 | ProfileManager::ProfileManager() { | 25 | ProfileManager::ProfileManager() { |
| 26 | // TODO(ogniK): Create the default user we have for now until loading/saving users is added | 26 | for (std::size_t i = 0; i < Settings::values.users.size(); ++i) { |
| 27 | auto user_uuid = UUID{1, 0}; | 27 | const auto& val = Settings::values.users[i]; |
| 28 | ASSERT(CreateNewUser(user_uuid, Settings::values.username).IsSuccess()); | 28 | ASSERT(CreateNewUser(val.second, val.first).IsSuccess()); |
| 29 | OpenUser(user_uuid); | 29 | } |
| 30 | |||
| 31 | OpenUser(Settings::values.users[Settings::values.current_user].second); | ||
| 30 | } | 32 | } |
| 31 | 33 | ||
| 32 | ProfileManager::~ProfileManager() = default; | 34 | ProfileManager::~ProfileManager() = default; |
diff --git a/src/core/hle/service/acc/profile_manager.h b/src/core/hle/service/acc/profile_manager.h index bffd4cf4d..9ce3eb47c 100644 --- a/src/core/hle/service/acc/profile_manager.h +++ b/src/core/hle/service/acc/profile_manager.h | |||
| @@ -81,7 +81,7 @@ static_assert(sizeof(ProfileBase) == 0x38, "ProfileBase is an invalid size"); | |||
| 81 | /// objects | 81 | /// objects |
| 82 | class ProfileManager { | 82 | class ProfileManager { |
| 83 | public: | 83 | public: |
| 84 | ProfileManager(); // TODO(ogniK): Load from system save | 84 | ProfileManager(); |
| 85 | ~ProfileManager(); | 85 | ~ProfileManager(); |
| 86 | 86 | ||
| 87 | ResultCode AddUser(const ProfileInfo& user); | 87 | ResultCode AddUser(const ProfileInfo& user); |