mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
android: Support changing multiple settings at once
This commit is contained in:
parent
4112031c81
commit
5aca03d0ff
2 changed files with 17 additions and 1 deletions
|
@ -42,7 +42,7 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun putSetting(setting: AbstractSetting) {
|
fun putSetting(setting: AbstractSetting) {
|
||||||
if (setting.section == null) {
|
if (setting.section == null || setting.key == null) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -244,5 +244,21 @@ object SettingsFile {
|
||||||
val setting = settings[key]
|
val setting = settings[key]
|
||||||
parser.put(header, setting!!.key, setting.valueAsString)
|
parser.put(header, setting!!.key, setting.valueAsString)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BooleanSetting.values().forEach {
|
||||||
|
if (!keySet.contains(it.key)) {
|
||||||
|
parser.put(header, it.key, it.valueAsString)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
IntSetting.values().forEach {
|
||||||
|
if (!keySet.contains(it.key)) {
|
||||||
|
parser.put(header, it.key, it.valueAsString)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
StringSetting.values().forEach {
|
||||||
|
if (!keySet.contains(it.key)) {
|
||||||
|
parser.put(header, it.key, it.valueAsString)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue