diff options
| author | 2023-08-02 12:20:19 -0400 | |
|---|---|---|
| committer | 2023-08-02 12:20:19 -0400 | |
| commit | 09e265c116ecbdcb61d9d26a1eb886abe2a6d05c (patch) | |
| tree | b3f0650c8f2ad904810a30044f4805b36fea4df7 | |
| parent | shared_widget: Only save global settings as needed (diff) | |
| download | yuzu-09e265c116ecbdcb61d9d26a1eb886abe2a6d05c.tar.gz yuzu-09e265c116ecbdcb61d9d26a1eb886abe2a6d05c.tar.xz yuzu-09e265c116ecbdcb61d9d26a1eb886abe2a6d05c.zip | |
config(qt): Use qt_config directly to read config
ReadSetting with the default is a convenience function reading
settings, not for use in an internal environment. It tries to manage
the default value of a setting.
| -rw-r--r-- | src/yuzu/configuration/config.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 880e5f4d6..01310733d 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp | |||
| @@ -1271,9 +1271,11 @@ void Config::ReadSettingGeneric(Settings::BasicSetting* const setting) { | |||
| 1271 | } | 1271 | } |
| 1272 | 1272 | ||
| 1273 | if (global || !use_global) { | 1273 | if (global || !use_global) { |
| 1274 | const bool is_default = ReadSetting(name + QStringLiteral("/default"), true).value<bool>(); | 1274 | const bool is_default = |
| 1275 | qt_config->value(name + QStringLiteral("/default"), true).value<bool>(); | ||
| 1275 | if (!is_default) { | 1276 | if (!is_default) { |
| 1276 | setting->LoadString(ReadSetting(name, default_value).value<QString>().toStdString()); | 1277 | setting->LoadString( |
| 1278 | qt_config->value(name, default_value).value<QString>().toStdString()); | ||
| 1277 | } else { | 1279 | } else { |
| 1278 | // Empty string resets the Setting to default | 1280 | // Empty string resets the Setting to default |
| 1279 | setting->LoadString(""); | 1281 | setting->LoadString(""); |