diff options
| author | 2023-09-27 01:15:57 -0400 | |
|---|---|---|
| committer | 2023-09-27 01:15:57 -0400 | |
| commit | 481f91cc345f3929530e1de33c607fe28e6221a2 (patch) | |
| tree | 21dd5359f5180191c1983dae916da2aeef473adf | |
| parent | Merge pull request #11602 from t895/case-fix (diff) | |
| download | yuzu-481f91cc345f3929530e1de33c607fe28e6221a2.tar.gz yuzu-481f91cc345f3929530e1de33c607fe28e6221a2.tar.xz yuzu-481f91cc345f3929530e1de33c607fe28e6221a2.zip | |
android: Correctly reload settings file during reset
Previously the config file wasn't being recreated when resetting all settings. Now just call into native code to recreate the settings file and reload all defaults.
Diffstat (limited to '')
| -rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt index ea26a21d0..c73edd50e 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt | |||
| @@ -21,6 +21,7 @@ import androidx.navigation.navArgs | |||
| 21 | import com.google.android.material.color.MaterialColors | 21 | import com.google.android.material.color.MaterialColors |
| 22 | import kotlinx.coroutines.flow.collectLatest | 22 | import kotlinx.coroutines.flow.collectLatest |
| 23 | import kotlinx.coroutines.launch | 23 | import kotlinx.coroutines.launch |
| 24 | import org.yuzu.yuzu_emu.NativeLibrary | ||
| 24 | import java.io.IOException | 25 | import java.io.IOException |
| 25 | import org.yuzu.yuzu_emu.R | 26 | import org.yuzu.yuzu_emu.R |
| 26 | import org.yuzu.yuzu_emu.databinding.ActivitySettingsBinding | 27 | import org.yuzu.yuzu_emu.databinding.ActivitySettingsBinding |
| @@ -168,7 +169,7 @@ class SettingsActivity : AppCompatActivity() { | |||
| 168 | if (!settingsFile.delete()) { | 169 | if (!settingsFile.delete()) { |
| 169 | throw IOException("Failed to delete $settingsFile") | 170 | throw IOException("Failed to delete $settingsFile") |
| 170 | } | 171 | } |
| 171 | Settings.settingsList.forEach { it.reset() } | 172 | NativeLibrary.reloadSettings() |
| 172 | 173 | ||
| 173 | Toast.makeText( | 174 | Toast.makeText( |
| 174 | applicationContext, | 175 | applicationContext, |