summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-08-03 14:55:41 +0200
committerLioncash <mathew1800@gmail.com>2020-08-03 15:01:31 +0200
commit3fcaf937d2d59a2797acfb8fd0063be69ba5296e (patch)
treee148436f48d09ddbb23509cd4843171c5213d36e /src
parentMerge pull request #4437 from lioncash/ptr (diff)
downloadyuzu-3fcaf937d2d59a2797acfb8fd0063be69ba5296e.tar
yuzu-3fcaf937d2d59a2797acfb8fd0063be69ba5296e.tar.gz
yuzu-3fcaf937d2d59a2797acfb8fd0063be69ba5296e.tar.bz2
yuzu-3fcaf937d2d59a2797acfb8fd0063be69ba5296e.tar.lz
yuzu-3fcaf937d2d59a2797acfb8fd0063be69ba5296e.tar.xz
yuzu-3fcaf937d2d59a2797acfb8fd0063be69ba5296e.tar.zst
yuzu-3fcaf937d2d59a2797acfb8fd0063be69ba5296e.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/acc/profile_manager.cpp35
1 files changed, 22 insertions, 13 deletions
diff --git a/src/core/hle/service/acc/profile_manager.cpp b/src/core/hle/service/acc/profile_manager.cpp
index eb8c81645..3867ca29a 100644
--- a/src/core/hle/service/acc/profile_manager.cpp
+++ b/src/core/hle/service/acc/profile_manager.cpp
@@ -101,13 +101,14 @@ ResultCode ProfileManager::CreateNewUser(UUID uuid, const ProfileUsername& usern
[&uuid](const ProfileInfo& profile) { return uuid == profile.user_uuid; })) {
return ERROR_USER_ALREADY_EXISTS;
}
- ProfileInfo profile;
- profile.user_uuid = uuid;
- profile.username = username;
- profile.data = {};
- profile.creation_time = 0x0;
- profile.is_open = false;
- return AddUser(profile);
+
+ return AddUser({
+ .user_uuid = uuid,
+ .username = username,
+ .creation_time = 0,
+ .data = {},
+ .is_open = false,
+ });
}
/// Creates a new user on the system. This function allows a much simpler method of registration
@@ -339,7 +340,13 @@ void ProfileManager::ParseUserSaveFile() {
continue;
}
- AddUser({user.uuid, user.username, user.timestamp, user.extra_data, false});
+ AddUser({
+ .user_uuid = user.uuid,
+ .username = user.username,
+ .creation_time = user.timestamp,
+ .data = user.extra_data,
+ .is_open = false,
+ });
}
std::stable_partition(profiles.begin(), profiles.end(),
@@ -350,11 +357,13 @@ void ProfileManager::WriteUserSaveFile() {
ProfileDataRaw raw{};
for (std::size_t i = 0; i < MAX_USERS; ++i) {
- raw.users[i].username = profiles[i].username;
- raw.users[i].uuid2 = profiles[i].user_uuid;
- raw.users[i].uuid = profiles[i].user_uuid;
- raw.users[i].timestamp = profiles[i].creation_time;
- raw.users[i].extra_data = profiles[i].data;
+ raw.users[i] = {
+ .uuid = profiles[i].user_uuid,
+ .uuid2 = profiles[i].user_uuid,
+ .timestamp = profiles[i].creation_time,
+ .username = profiles[i].username,
+ .extra_data = profiles[i].data,
+ };
}
const auto raw_path =