diff options
| author | 2018-10-10 21:49:20 -0400 | |
|---|---|---|
| committer | 2018-10-23 19:31:28 -0400 | |
| commit | 702622b8f1eaa1b297a27a305ac56faeadf542d7 (patch) | |
| tree | 8bd4dd63015771d124b5b599240b06d08bfe203f /src/yuzu_cmd/config.cpp | |
| parent | acc: Load user images from config dir (diff) | |
| download | yuzu-702622b8f1eaa1b297a27a305ac56faeadf542d7.tar.gz yuzu-702622b8f1eaa1b297a27a305ac56faeadf542d7.tar.xz yuzu-702622b8f1eaa1b297a27a305ac56faeadf542d7.zip | |
profile_manager: Load user icons, names, and UUIDs from system save
Diffstat (limited to 'src/yuzu_cmd/config.cpp')
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index 613894449..f6083dcb3 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp | |||
| @@ -128,24 +128,8 @@ void Config::ReadValues() { | |||
| 128 | Settings::values.enable_nfc = sdl2_config->GetBoolean("System", "enable_nfc", true); | 128 | Settings::values.enable_nfc = sdl2_config->GetBoolean("System", "enable_nfc", true); |
| 129 | const auto size = sdl2_config->GetInteger("System", "users_size", 0); | 129 | const auto size = sdl2_config->GetInteger("System", "users_size", 0); |
| 130 | 130 | ||
| 131 | Settings::values.users.clear(); | 131 | Settings::values.current_user = |
| 132 | for (std::size_t i = 0; i < size; ++i) { | 132 | std::clamp<int>(sdl2_config->GetInteger("System", "current_user", 0), 0, 7); |
| 133 | const auto uuid_low = std::stoull( | ||
| 134 | sdl2_config->Get("System", fmt::format("users_{}_uuid_low", i), "0"), nullptr, 0); | ||
| 135 | const auto uuid_high = std::stoull( | ||
| 136 | sdl2_config->Get("System", fmt::format("users_{}_uuid_high", i), "0"), nullptr, 0); | ||
| 137 | Settings::values.users.emplace_back( | ||
| 138 | sdl2_config->Get("System", fmt::format("users_{}_username", i), ""), | ||
| 139 | Service::Account::UUID{uuid_low, uuid_high}); | ||
| 140 | } | ||
| 141 | |||
| 142 | if (Settings::values.users.empty()) { | ||
| 143 | Settings::values.users.emplace_back("yuzu", Service::Account::UUID{1, 0}); | ||
| 144 | LOG_WARNING( | ||
| 145 | Config, | ||
| 146 | "You are using the default UUID of {1, 0}! This might cause issues down the road! " | ||
| 147 | "Please consider randomizing a UUID and adding it to the sdl2_config.ini file."); | ||
| 148 | } | ||
| 149 | 133 | ||
| 150 | // Miscellaneous | 134 | // Miscellaneous |
| 151 | Settings::values.log_filter = sdl2_config->Get("Miscellaneous", "log_filter", "*:Trace"); | 135 | Settings::values.log_filter = sdl2_config->Get("Miscellaneous", "log_filter", "*:Trace"); |