Skip to content
Snippets Groups Projects
Commit aeffd4b4 authored by Zach Hilman's avatar Zach Hilman
Browse files

profile_manager: Load users from emulator settings

parent e7e3d589
No related branches found
No related tags found
No related merge requests found
......@@ -23,10 +23,12 @@ const UUID& UUID::Generate() {
}
ProfileManager::ProfileManager() {
// TODO(ogniK): Create the default user we have for now until loading/saving users is added
auto user_uuid = UUID{1, 0};
ASSERT(CreateNewUser(user_uuid, Settings::values.username).IsSuccess());
OpenUser(user_uuid);
for (std::size_t i = 0; i < Settings::values.users.size(); ++i) {
const auto& val = Settings::values.users[i];
ASSERT(CreateNewUser(val.second, val.first).IsSuccess());
}
OpenUser(Settings::values.users[Settings::values.current_user].second);
}
ProfileManager::~ProfileManager() = default;
......
......@@ -81,7 +81,7 @@ static_assert(sizeof(ProfileBase) == 0x38, "ProfileBase is an invalid size");
/// objects
class ProfileManager {
public:
ProfileManager(); // TODO(ogniK): Load from system save
ProfileManager();
~ProfileManager();
ResultCode AddUser(const ProfileInfo& user);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment