From aa4d15594f7bfd1c1aeb5d9ba40a59ff689e25e7 Mon Sep 17 00:00:00 2001 From: t895 Date: Fri, 29 Dec 2023 16:55:00 -0500 Subject: android: Expose touchscreen toggle --- .../src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt | 7 +++++++ src/android/app/src/main/res/menu/menu_overlay_options.xml | 5 +++++ src/android/app/src/main/res/values/strings.xml | 1 + 3 files changed, 13 insertions(+) (limited to 'src/android') 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 6e5dd1dba..510b2b5eb 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 @@ -539,6 +539,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { findItem(R.id.menu_show_overlay).isChecked = BooleanSetting.SHOW_INPUT_OVERLAY.getBoolean() findItem(R.id.menu_haptics).isChecked = BooleanSetting.HAPTIC_FEEDBACK.getBoolean() + findItem(R.id.menu_touchscreen).isChecked = BooleanSetting.TOUCHSCREEN.getBoolean() } popup.setOnMenuItemClickListener { @@ -628,6 +629,12 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { true } + R.id.menu_touchscreen -> { + it.isChecked = !it.isChecked + BooleanSetting.TOUCHSCREEN.setBoolean(it.isChecked) + true + } + R.id.menu_reset_overlay -> { binding.drawerLayout.close() resetInputOverlay() diff --git a/src/android/app/src/main/res/menu/menu_overlay_options.xml b/src/android/app/src/main/res/menu/menu_overlay_options.xml index 4885b4f6f..363781652 100644 --- a/src/android/app/src/main/res/menu/menu_overlay_options.xml +++ b/src/android/app/src/main/res/menu/menu_overlay_options.xml @@ -38,6 +38,11 @@ android:title="@string/emulation_haptics" android:checkable="true" /> + + diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index 4d5c268fe..1bedcb1ef 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -366,6 +366,7 @@ Pause emulation Unpause emulation Overlay options + Touchscreen Loading settingsā€¦ -- cgit v1.2.3