mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-14 06:19:58 +00:00
profile_manager: Load users from emulator settings
This commit is contained in:
parent
e7e3d5898e
commit
aeffd4b436
2 changed files with 7 additions and 5 deletions
|
@ -23,10 +23,12 @@ const UUID& UUID::Generate() {
|
||||||
}
|
}
|
||||||
|
|
||||||
ProfileManager::ProfileManager() {
|
ProfileManager::ProfileManager() {
|
||||||
// TODO(ogniK): Create the default user we have for now until loading/saving users is added
|
for (std::size_t i = 0; i < Settings::values.users.size(); ++i) {
|
||||||
auto user_uuid = UUID{1, 0};
|
const auto& val = Settings::values.users[i];
|
||||||
ASSERT(CreateNewUser(user_uuid, Settings::values.username).IsSuccess());
|
ASSERT(CreateNewUser(val.second, val.first).IsSuccess());
|
||||||
OpenUser(user_uuid);
|
}
|
||||||
|
|
||||||
|
OpenUser(Settings::values.users[Settings::values.current_user].second);
|
||||||
}
|
}
|
||||||
|
|
||||||
ProfileManager::~ProfileManager() = default;
|
ProfileManager::~ProfileManager() = default;
|
||||||
|
|
|
@ -81,7 +81,7 @@ static_assert(sizeof(ProfileBase) == 0x38, "ProfileBase is an invalid size");
|
||||||
/// objects
|
/// objects
|
||||||
class ProfileManager {
|
class ProfileManager {
|
||||||
public:
|
public:
|
||||||
ProfileManager(); // TODO(ogniK): Load from system save
|
ProfileManager();
|
||||||
~ProfileManager();
|
~ProfileManager();
|
||||||
|
|
||||||
ResultCode AddUser(const ProfileInfo& user);
|
ResultCode AddUser(const ProfileInfo& user);
|
||||||
|
|
Loading…
Reference in a new issue