summaryrefslogtreecommitdiffstats
path: root/src/yuzu_cmd
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2022-11-28 14:14:32 +0100
committerGitHub <noreply@github.com>2022-11-28 14:14:32 +0100
commit6291eec7003fb03828a3ab3fb974eaba9c8784b2 (patch)
tree24d8ff8dcc1e555328e777f3a8a4fa8a1814b0e1 /src/yuzu_cmd
parentMerge pull request #8829 from Docteh/qt6_0002 (diff)
parentyuzu-cmd: Fix default config value (diff)
downloadyuzu-6291eec7003fb03828a3ab3fb974eaba9c8784b2.tar
yuzu-6291eec7003fb03828a3ab3fb974eaba9c8784b2.tar.gz
yuzu-6291eec7003fb03828a3ab3fb974eaba9c8784b2.tar.bz2
yuzu-6291eec7003fb03828a3ab3fb974eaba9c8784b2.tar.lz
yuzu-6291eec7003fb03828a3ab3fb974eaba9c8784b2.tar.xz
yuzu-6291eec7003fb03828a3ab3fb974eaba9c8784b2.tar.zst
yuzu-6291eec7003fb03828a3ab3fb974eaba9c8784b2.zip
Diffstat (limited to 'src/yuzu_cmd')
-rw-r--r--src/yuzu_cmd/config.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp
index d6bea9aa8..59f9c8e09 100644
--- a/src/yuzu_cmd/config.cpp
+++ b/src/yuzu_cmd/config.cpp
@@ -90,7 +90,11 @@ static const std::array<std::array<int, 5>, Settings::NativeAnalog::NumAnalogs>
template <>
void Config::ReadSetting(const std::string& group, Settings::Setting<std::string>& setting) {
- setting = sdl2_config->Get(group, setting.GetLabel(), setting.GetDefault());
+ std::string setting_value = sdl2_config->Get(group, setting.GetLabel(), setting.GetDefault());
+ if (setting_value.empty()) {
+ setting_value = setting.GetDefault();
+ }
+ setting = std::move(setting_value);
}
template <>