mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-26 03:05:48 +01:00
Merge pull request #12575 from t895/inconsistent-settings-application
frontend_common: config: Only write setting related to opened config file
This commit is contained in:
commit
a8f62bff43
@ -167,13 +167,14 @@ class GamesViewModel : ViewModel() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun onCloseGameFoldersFragment() =
|
fun onCloseGameFoldersFragment() {
|
||||||
|
NativeConfig.saveGlobalConfig()
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
withContext(Dispatchers.IO) {
|
withContext(Dispatchers.IO) {
|
||||||
NativeConfig.saveGlobalConfig()
|
|
||||||
getGameDirs(true)
|
getGameDirs(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun getGameDirs(reloadList: Boolean = false) {
|
private fun getGameDirs(reloadList: Boolean = false) {
|
||||||
val gameDirs = NativeConfig.getGameDirs()
|
val gameDirs = NativeConfig.getGameDirs()
|
||||||
|
@ -14,12 +14,6 @@ AndroidConfig::AndroidConfig(const std::string& config_name, ConfigType config_t
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AndroidConfig::~AndroidConfig() {
|
|
||||||
if (global) {
|
|
||||||
AndroidConfig::SaveAllValues();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void AndroidConfig::ReloadAllValues() {
|
void AndroidConfig::ReloadAllValues() {
|
||||||
Reload();
|
Reload();
|
||||||
ReadAndroidValues();
|
ReadAndroidValues();
|
||||||
|
@ -9,7 +9,6 @@ class AndroidConfig final : public Config {
|
|||||||
public:
|
public:
|
||||||
explicit AndroidConfig(const std::string& config_name = "config",
|
explicit AndroidConfig(const std::string& config_name = "config",
|
||||||
ConfigType config_type = ConfigType::GlobalConfig);
|
ConfigType config_type = ConfigType::GlobalConfig);
|
||||||
~AndroidConfig() override;
|
|
||||||
|
|
||||||
void ReloadAllValues() override;
|
void ReloadAllValues() override;
|
||||||
void SaveAllValues() override;
|
void SaveAllValues() override;
|
||||||
|
@ -883,9 +883,10 @@ void Config::WriteSettingGeneric(const Settings::BasicSetting* const setting) {
|
|||||||
WriteBooleanSetting(std::string(key).append("\\use_global"), setting->UsingGlobal());
|
WriteBooleanSetting(std::string(key).append("\\use_global"), setting->UsingGlobal());
|
||||||
}
|
}
|
||||||
if (global || !setting->UsingGlobal()) {
|
if (global || !setting->UsingGlobal()) {
|
||||||
|
auto value = global ? setting->ToStringGlobal() : setting->ToString();
|
||||||
WriteBooleanSetting(std::string(key).append("\\default"),
|
WriteBooleanSetting(std::string(key).append("\\default"),
|
||||||
setting->ToString() == setting->DefaultToString());
|
value == setting->DefaultToString());
|
||||||
WriteStringSetting(key, setting->ToString());
|
WriteStringSetting(key, value);
|
||||||
}
|
}
|
||||||
} else if (global) {
|
} else if (global) {
|
||||||
WriteBooleanSetting(std::string(key).append("\\default"),
|
WriteBooleanSetting(std::string(key).append("\\default"),
|
||||||
|
Loading…
Reference in New Issue
Block a user