diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2022-11-28 14:14:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-28 14:14:32 +0100 |
commit | 6291eec7003fb03828a3ab3fb974eaba9c8784b2 (patch) | |
tree | 24d8ff8dcc1e555328e777f3a8a4fa8a1814b0e1 | |
parent | Merge pull request #8829 from Docteh/qt6_0002 (diff) | |
parent | yuzu-cmd: Fix default config value (diff) | |
download | yuzu-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 |
-rw-r--r-- | src/yuzu_cmd/config.cpp | 6 |
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 <> |