From bd8964a32de8eba2d586fa80ccb7be76eb261c8b Mon Sep 17 00:00:00 2001 From: Filippo Scognamiglio Date: Mon, 21 Mar 2022 23:00:22 +0100 Subject: [PATCH 1/2] Remove DPAD buttons from input keys. They are sent twice on standard gamepads. --- .../lemuroid/app/shared/input/InputClassGamePad.kt | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lemuroid-app/src/main/java/com/swordfish/lemuroid/app/shared/input/InputClassGamePad.kt b/lemuroid-app/src/main/java/com/swordfish/lemuroid/app/shared/input/InputClassGamePad.kt index 8d82c86cf5..f803e8a041 100644 --- a/lemuroid-app/src/main/java/com/swordfish/lemuroid/app/shared/input/InputClassGamePad.kt +++ b/lemuroid-app/src/main/java/com/swordfish/lemuroid/app/shared/input/InputClassGamePad.kt @@ -16,14 +16,6 @@ object InputClassGamePad : InputClass { ) private val INPUT_KEYS = listOf( - KeyEvent.KEYCODE_DPAD_UP, - KeyEvent.KEYCODE_DPAD_DOWN, - KeyEvent.KEYCODE_DPAD_RIGHT, - KeyEvent.KEYCODE_DPAD_LEFT, - KeyEvent.KEYCODE_DPAD_UP_LEFT, - KeyEvent.KEYCODE_DPAD_UP_RIGHT, - KeyEvent.KEYCODE_DPAD_DOWN_LEFT, - KeyEvent.KEYCODE_DPAD_DOWN_RIGHT, KeyEvent.KEYCODE_BUTTON_A, KeyEvent.KEYCODE_BUTTON_B, KeyEvent.KEYCODE_BUTTON_X, From 2f188bc2bb6e722a56b8bd163555b2b973235fb5 Mon Sep 17 00:00:00 2001 From: Filippo Scognamiglio Date: Mon, 21 Mar 2022 23:00:53 +0100 Subject: [PATCH 2/2] Add Start and Select buttons to minimal supported gamepads. --- .../swordfish/lemuroid/app/shared/input/InputClassGamePad.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lemuroid-app/src/main/java/com/swordfish/lemuroid/app/shared/input/InputClassGamePad.kt b/lemuroid-app/src/main/java/com/swordfish/lemuroid/app/shared/input/InputClassGamePad.kt index f803e8a041..f16517b02e 100644 --- a/lemuroid-app/src/main/java/com/swordfish/lemuroid/app/shared/input/InputClassGamePad.kt +++ b/lemuroid-app/src/main/java/com/swordfish/lemuroid/app/shared/input/InputClassGamePad.kt @@ -13,6 +13,8 @@ object InputClassGamePad : InputClass { KeyEvent.KEYCODE_BUTTON_B, KeyEvent.KEYCODE_BUTTON_X, KeyEvent.KEYCODE_BUTTON_Y, + KeyEvent.KEYCODE_BUTTON_START, + KeyEvent.KEYCODE_BUTTON_SELECT, ) private val INPUT_KEYS = listOf(