summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authort895 <clombardo169@gmail.com>2024-01-18 02:09:00 +0100
committert895 <clombardo169@gmail.com>2024-01-18 02:14:25 +0100
commit116f76e4b672af3bf4ba0c2840e0c462538ac075 (patch)
tree0c62e10d8510a3c4f546ad12b27199a511dd2c04 /src
parentMerge pull request #12689 from liamwhite/remove-format (diff)
downloadyuzu-116f76e4b672af3bf4ba0c2840e0c462538ac075.tar
yuzu-116f76e4b672af3bf4ba0c2840e0c462538ac075.tar.gz
yuzu-116f76e4b672af3bf4ba0c2840e0c462538ac075.tar.bz2
yuzu-116f76e4b672af3bf4ba0c2840e0c462538ac075.tar.lz
yuzu-116f76e4b672af3bf4ba0c2840e0c462538ac075.tar.xz
yuzu-116f76e4b672af3bf4ba0c2840e0c462538ac075.tar.zst
yuzu-116f76e4b672af3bf4ba0c2840e0c462538ac075.zip
Diffstat (limited to 'src')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt6
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt5
2 files changed, 4 insertions, 7 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt
index 93c8ce922..9b08f008d 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt
@@ -49,7 +49,6 @@ import org.yuzu.yuzu_emu.utils.ForegroundService
import org.yuzu.yuzu_emu.utils.InputHandler
import org.yuzu.yuzu_emu.utils.Log
import org.yuzu.yuzu_emu.utils.MemoryUtil
-import org.yuzu.yuzu_emu.utils.NativeConfig
import org.yuzu.yuzu_emu.utils.NfcReader
import org.yuzu.yuzu_emu.utils.ThemeHelper
import java.text.NumberFormat
@@ -171,11 +170,6 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener {
stopMotionSensorListener()
}
- override fun onStop() {
- super.onStop()
- NativeConfig.saveGlobalConfig()
- }
-
override fun onUserLeaveHint() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {
if (BooleanSetting.PICTURE_IN_PICTURE.getBoolean() && !isInPictureInPictureMode) {
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt
index 9efc1705d..47767454a 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt
@@ -554,6 +554,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
findItem(R.id.menu_touchscreen).isChecked = BooleanSetting.TOUCHSCREEN.getBoolean()
}
+ popup.setOnDismissListener { NativeConfig.saveGlobalConfig() }
popup.setOnMenuItemClickListener {
when (it.itemId) {
R.id.menu_toggle_fps -> {
@@ -720,7 +721,9 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
MaterialAlertDialogBuilder(requireContext())
.setTitle(R.string.emulation_control_adjust)
.setView(adjustBinding.root)
- .setPositiveButton(android.R.string.ok, null)
+ .setPositiveButton(android.R.string.ok) { _: DialogInterface?, _: Int ->
+ NativeConfig.saveGlobalConfig()
+ }
.setNeutralButton(R.string.slider_default) { _: DialogInterface?, _: Int ->
setControlScale(50)
setControlOpacity(100)