diff options
author | Charles Lombardo <clombardo169@gmail.com> | 2023-04-04 19:22:38 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2023-06-03 09:05:50 +0200 |
commit | aeaddf407b8597bdb88cc268e7d7b9171d01dbce (patch) | |
tree | 61e32eb31fad62362edcc85978072678da6cee4d | |
parent | android: Add DPad slide toggle (diff) | |
download | yuzu-aeaddf407b8597bdb88cc268e7d7b9171d01dbce.tar yuzu-aeaddf407b8597bdb88cc268e7d7b9171d01dbce.tar.gz yuzu-aeaddf407b8597bdb88cc268e7d7b9171d01dbce.tar.bz2 yuzu-aeaddf407b8597bdb88cc268e7d7b9171d01dbce.tar.lz yuzu-aeaddf407b8597bdb88cc268e7d7b9171d01dbce.tar.xz yuzu-aeaddf407b8597bdb88cc268e7d7b9171d01dbce.tar.zst yuzu-aeaddf407b8597bdb88cc268e7d7b9171d01dbce.zip |
3 files changed, 3 insertions, 4 deletions
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 c7e44a0fb..8e94fd1db 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 @@ -249,7 +249,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { ) { _, indexSelected, isChecked -> preferences.edit() .putBoolean("buttonToggle$indexSelected", isChecked) - .commit() + .apply() } .setPositiveButton(android.R.string.ok) { _, _ -> refreshInputOverlay() diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt index 7bff0a9cd..9b27ff1e3 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt @@ -758,8 +758,7 @@ class InputOverlay(context: Context, attrs: AttributeSet?) : SurfaceView(context ButtonType.STICK_L.toString() + "-Y", resources.getInteger(R.integer.SWITCH_STICK_L_Y).toFloat() / 1000 * maxY + minY ) - .commit() - // We want to commit right away, otherwise the overlay could load before this is saved. + .apply() } override fun isInEditMode(): Boolean { diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/EmulationMenuSettings.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/EmulationMenuSettings.kt index 021698d15..27dbfb9eb 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/EmulationMenuSettings.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/EmulationMenuSettings.kt @@ -57,6 +57,6 @@ object EmulationMenuSettings { set(value) { preferences.edit() .putBoolean(Settings.PREF_MENU_SETTINGS_SHOW_OVERLAY, value) - .commit() + .apply() } } |