diff options
author | Philippe Babin <philippe.babin@gmail.com> | 2018-09-19 01:58:28 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-09-19 01:58:28 +0200 |
commit | 9155c8daeb2207dfa23ab4bf33a2ba244a325cf9 (patch) | |
tree | e5ff7af81fc0075b357ed9d698d7db194004e96b /src | |
parent | Merge pull request #1343 from lioncash/mutex (diff) | |
download | yuzu-9155c8daeb2207dfa23ab4bf33a2ba244a325cf9.tar yuzu-9155c8daeb2207dfa23ab4bf33a2ba244a325cf9.tar.gz yuzu-9155c8daeb2207dfa23ab4bf33a2ba244a325cf9.tar.bz2 yuzu-9155c8daeb2207dfa23ab4bf33a2ba244a325cf9.tar.lz yuzu-9155c8daeb2207dfa23ab4bf33a2ba244a325cf9.tar.xz yuzu-9155c8daeb2207dfa23ab4bf33a2ba244a325cf9.tar.zst yuzu-9155c8daeb2207dfa23ab4bf33a2ba244a325cf9.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/acc/profile_manager.cpp | 5 | ||||
-rw-r--r-- | src/yuzu_cmd/config.cpp | 4 | ||||
-rw-r--r-- | src/yuzu_cmd/default_ini.h | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/src/core/hle/service/acc/profile_manager.cpp b/src/core/hle/service/acc/profile_manager.cpp index 0071ca613..bcb3475db 100644 --- a/src/core/hle/service/acc/profile_manager.cpp +++ b/src/core/hle/service/acc/profile_manager.cpp @@ -25,7 +25,7 @@ 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}; - CreateNewUser(user_uuid, Settings::values.username); + ASSERT(CreateNewUser(user_uuid, Settings::values.username).IsSuccess()); OpenUser(user_uuid); } @@ -91,7 +91,8 @@ ResultCode ProfileManager::CreateNewUser(UUID uuid, const ProfileUsername& usern /// specifically by allowing an std::string for the username. This is required specifically since /// we're loading a string straight from the config ResultCode ProfileManager::CreateNewUser(UUID uuid, const std::string& username) { - ProfileUsername username_output; + ProfileUsername username_output{}; + if (username.size() > username_output.size()) { std::copy_n(username.begin(), username_output.size(), username_output.begin()); } else { diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index 991abda2e..7ec1f5110 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp @@ -125,6 +125,10 @@ void Config::ReadValues() { // System Settings::values.use_docked_mode = sdl2_config->GetBoolean("System", "use_docked_mode", false); + Settings::values.username = sdl2_config->Get("System", "username", "yuzu"); + if (Settings::values.username.empty()) { + Settings::values.username = "yuzu"; + } // Miscellaneous Settings::values.log_filter = sdl2_config->Get("Miscellaneous", "log_filter", "*:Trace"); diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h index 002a4ec15..d35c441e9 100644 --- a/src/yuzu_cmd/default_ini.h +++ b/src/yuzu_cmd/default_ini.h @@ -176,7 +176,7 @@ use_docked_mode = # Sets the account username, max length is 32 characters # yuzu (default) -username = +username = yuzu # Sets the systems language index # 0: Japanese, 1: English (default), 2: French, 3: German, 4: Italian, 5: Spanish, 6: Chinese, |