summaryrefslogtreecommitdiff
path: root/src/yuzu_cmd
diff options
context:
space:
mode:
authorPhilippe Babin <philippe.babin@gmail.com>2018-09-18 19:58:28 -0400
committerbunnei <bunneidev@gmail.com>2018-09-18 19:58:28 -0400
commit9155c8daeb2207dfa23ab4bf33a2ba244a325cf9 (patch)
treee5ff7af81fc0075b357ed9d698d7db194004e96b /src/yuzu_cmd
parent733c47623b98d873b58ce796b672b7b3d4081b0c (diff)
Invalid default value of username in yuzu_cmd (#1334)
* Fix bug where default username value for yuzu_cmd create an userprofile with uninitialize data as username * Fix format * Apply code review changes * Remove nullptr check
Diffstat (limited to 'src/yuzu_cmd')
-rw-r--r--src/yuzu_cmd/config.cpp4
-rw-r--r--src/yuzu_cmd/default_ini.h2
2 files changed, 5 insertions, 1 deletions
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,