diff --git a/input/android_input.c b/input/android_input.c index 901f52f610..1d96745da4 100644 --- a/input/android_input.c +++ b/input/android_input.c @@ -458,6 +458,7 @@ static void handle_hotplug(void *data, unsigned *port, unsigned id, RARCH_LOG("zeus_pad 2 detected: %d\n", id); zeus_second_id = id; } + strlcpy(name_buf, "Xperia Play", sizeof(name_buf)); } device = 0; @@ -581,7 +582,10 @@ static void handle_hotplug(void *data, unsigned *port, unsigned id, else if (strstr(name_buf, "tincore_adc_joystick")) device = DEVICE_JXD_S5110_SKELROM; else if (strstr(name_buf, "keypad-zeus") || (strstr(name_buf, "keypad-game-zeus"))) + { device = DEVICE_XPERIA_PLAY; + strlcpy(name, "Xperia Play", sizeof(name_buf)); + } else if (strstr(name_buf, "Broadcom Bluetooth HID")) device = DEVICE_BROADCOM_BLUETOOTH_HID; else if (strstr(name_buf, "USB Gamepad")) diff --git a/input/autoconf/builtin_android.c b/input/autoconf/builtin_android.c index 93a8b943a6..3f636c97fe 100644 --- a/input/autoconf/builtin_android.c +++ b/input/autoconf/builtin_android.c @@ -41,6 +41,21 @@ DECL_AXIS(r_y_plus, -3) \ DECL_AXIS(r_y_minus, +3) \ "input_menu_toggle_btn = 108\n" +#define ZEUS_DEFAULT_BINDS \ +DECL_BTN(a, 4) \ +DECL_BTN(b, 23) \ +DECL_BTN(x, 100) \ +DECL_BTN(y, 99) \ +DECL_BTN(start, 108) \ +DECL_BTN(select, 109) \ +DECL_BTN(up, 19) \ +DECL_BTN(down, 20) \ +DECL_BTN(left, 21) \ +DECL_BTN(right, 22) \ +DECL_BTN(l, 102) \ +DECL_BTN(r, 103) \ +"input_menu_toggle_btn = 82\n" + #define SIXAXIS_DEFAULT_BINDS \ DECL_BTN(a, 97) \ DECL_BTN(b, 96) \ @@ -141,6 +156,10 @@ const char* const input_builtin_autoconfs[] = "input_driver = \"android\" \n" SHIELD_DEFAULT_BINDS, + "input_device = \"Xperia Play\" \n" + "input_driver = \"android\" \n" + ZEUS_DEFAULT_BINDS, + "input_device = \"RumblePad 2\" \n" "input_driver = \"android\" \n" RUMBLEPAD2_DEFAULT_BINDS,