(Android) Add Xperia Play default binds

This commit is contained in:
twinaphex 2014-06-11 20:07:05 +02:00
parent c6d2be9eb4
commit fa766e60aa
2 changed files with 23 additions and 0 deletions

View File

@ -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"))

View File

@ -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,