mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-27 03:44:24 +01:00
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.
This commit is contained in:
parent
75180bdc9d
commit
481f91cc34
@ -21,6 +21,7 @@ import androidx.navigation.navArgs
|
|||||||
import com.google.android.material.color.MaterialColors
|
import com.google.android.material.color.MaterialColors
|
||||||
import kotlinx.coroutines.flow.collectLatest
|
import kotlinx.coroutines.flow.collectLatest
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
import org.yuzu.yuzu_emu.NativeLibrary
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import org.yuzu.yuzu_emu.R
|
import org.yuzu.yuzu_emu.R
|
||||||
import org.yuzu.yuzu_emu.databinding.ActivitySettingsBinding
|
import org.yuzu.yuzu_emu.databinding.ActivitySettingsBinding
|
||||||
@ -168,7 +169,7 @@ class SettingsActivity : AppCompatActivity() {
|
|||||||
if (!settingsFile.delete()) {
|
if (!settingsFile.delete()) {
|
||||||
throw IOException("Failed to delete $settingsFile")
|
throw IOException("Failed to delete $settingsFile")
|
||||||
}
|
}
|
||||||
Settings.settingsList.forEach { it.reset() }
|
NativeLibrary.reloadSettings()
|
||||||
|
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
applicationContext,
|
applicationContext,
|
||||||
|
Loading…
Reference in New Issue
Block a user