diff options
| author | 2022-11-28 08:14:32 -0500 | |
|---|---|---|
| committer | 2022-11-28 08:14:32 -0500 | |
| commit | 6291eec7003fb03828a3ab3fb974eaba9c8784b2 (patch) | |
| tree | 24d8ff8dcc1e555328e777f3a8a4fa8a1814b0e1 /src | |
| parent | Merge pull request #8829 from Docteh/qt6_0002 (diff) | |
| parent | yuzu-cmd: Fix default config value (diff) | |
| download | yuzu-6291eec7003fb03828a3ab3fb974eaba9c8784b2.tar.gz yuzu-6291eec7003fb03828a3ab3fb974eaba9c8784b2.tar.xz yuzu-6291eec7003fb03828a3ab3fb974eaba9c8784b2.zip | |
Merge pull request #9325 from german77/default_by_default
yuzu-cmd: Fix default config value
Diffstat (limited to 'src')
| -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> | |||
| 90 | 90 | ||
| 91 | template <> | 91 | template <> |
| 92 | void Config::ReadSetting(const std::string& group, Settings::Setting<std::string>& setting) { | 92 | void Config::ReadSetting(const std::string& group, Settings::Setting<std::string>& setting) { |
| 93 | setting = sdl2_config->Get(group, setting.GetLabel(), setting.GetDefault()); | 93 | std::string setting_value = sdl2_config->Get(group, setting.GetLabel(), setting.GetDefault()); |
| 94 | if (setting_value.empty()) { | ||
| 95 | setting_value = setting.GetDefault(); | ||
| 96 | } | ||
| 97 | setting = std::move(setting_value); | ||
| 94 | } | 98 | } |
| 95 | 99 | ||
| 96 | template <> | 100 | template <> |