1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Fix Xbox Controller on Android

(cherry picked from commit cf00265386)
This commit is contained in:
Alexander Hartmann
2025-05-02 04:29:57 +02:00
committed by lawnjelly
parent 4b96b71ede
commit 7560e27316
2 changed files with 18 additions and 0 deletions

View File

@@ -408,6 +408,9 @@ public class GodotInputHandler implements InputManager.InputDeviceListener {
case KeyEvent.KEYCODE_BUTTON_SELECT:
button = 4;
break;
case KeyEvent.KEYCODE_BUTTON_MODE: // Home/Xbox Button on Xbox controllers
button = 5;
break;
case KeyEvent.KEYCODE_BUTTON_START:
button = 6;
break;
@@ -429,6 +432,9 @@ public class GodotInputHandler implements InputManager.InputDeviceListener {
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;