Merge pull request #106021 from Alex2782/fix_xbox_controller_on_android

Fix Xbox Controller on Android
This commit is contained in:
Thaddeus Crews 2025-05-16 07:43:09 -05:00
commit 5620a215a1
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
2 changed files with 18 additions and 0 deletions

View file

@ -449,6 +449,9 @@ public class GodotInputHandler implements InputManager.InputDeviceListener, Sens
case KeyEvent.KEYCODE_BACK:
button = 4;
break;
case KeyEvent.KEYCODE_BUTTON_MODE: // Home/Xbox Button on Xbox controllers
button = 5;
break;
case KeyEvent.KEYCODE_BUTTON_START:
case KeyEvent.KEYCODE_MENU:
button = 6;
@ -471,6 +474,9 @@ public class GodotInputHandler implements InputManager.InputDeviceListener, Sens
case KeyEvent.KEYCODE_DPAD_RIGHT:
button = 14;
break;
case KeyEvent.KEYCODE_MEDIA_RECORD: // Share Button on Xbox controllers
button = 15;
break;
case KeyEvent.KEYCODE_BUTTON_C:
button = 17;
break;