summaryrefslogtreecommitdiff
path: root/src/android/app
diff options
context:
space:
mode:
authorGravatar german772023-04-30 21:59:15 -0600
committerGravatar bunnei2023-06-03 00:05:57 -0700
commit265b9139e01e0f81242b4ca27ecdbb47bda85dae (patch)
treeab40848fe7984ed7190e9730643a785bc9760294 /src/android/app
parentandroid: Fix grammatical mistake in video core error message (diff)
downloadyuzu-265b9139e01e0f81242b4ca27ecdbb47bda85dae.tar.gz
yuzu-265b9139e01e0f81242b4ca27ecdbb47bda85dae.tar.xz
yuzu-265b9139e01e0f81242b4ca27ecdbb47bda85dae.zip
android: Fix inline keyboard input
Diffstat (limited to 'src/android/app')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt12
1 files changed, 7 insertions, 5 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 974e8b7a8..0070de36a 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
@@ -147,17 +147,19 @@ open class EmulationActivity : AppCompatActivity(), SensorEventListener {
147 } 147 }
148 148
149 override fun dispatchKeyEvent(event: KeyEvent): Boolean { 149 override fun dispatchKeyEvent(event: KeyEvent): Boolean {
150 // Handling the case where the back button is pressed. 150 if (event.source and InputDevice.SOURCE_JOYSTICK != InputDevice.SOURCE_JOYSTICK &&
151 if (event.keyCode == KeyEvent.KEYCODE_BACK) { 151 event.source and InputDevice.SOURCE_GAMEPAD != InputDevice.SOURCE_GAMEPAD
152 onBackPressedDispatcher.onBackPressed() 152 ) {
153 return true 153 return super.dispatchKeyEvent(event)
154 } 154 }
155 155
156 return inputHandler.dispatchKeyEvent(event) 156 return inputHandler.dispatchKeyEvent(event)
157 } 157 }
158 158
159 override fun dispatchGenericMotionEvent(event: MotionEvent): Boolean { 159 override fun dispatchGenericMotionEvent(event: MotionEvent): Boolean {
160 if (event.source and InputDevice.SOURCE_CLASS_JOYSTICK === 0) { 160 if (event.source and InputDevice.SOURCE_JOYSTICK != InputDevice.SOURCE_JOYSTICK &&
161 event.source and InputDevice.SOURCE_GAMEPAD != InputDevice.SOURCE_GAMEPAD
162 ) {
161 return super.dispatchGenericMotionEvent(event) 163 return super.dispatchGenericMotionEvent(event)
162 } 164 }
163 165