(Android) Add Sega Virtua Stick default binds

This commit is contained in:
twinaphex 2014-06-13 18:07:32 +02:00
parent 6536401c1e
commit d1c7cd650f
3 changed files with 24 additions and 18 deletions

View File

@ -405,7 +405,7 @@ static void handle_hotplug(void *data, unsigned *port, unsigned id,
else if (strstr(device_name, "iControlPad-")) // followed by a 4 (hex) char HW id
device = DEVICE_ICONTROLPAD_HID_JOYSTICK;
else if (strstr(device_name, "SEGA VIRTUA STICK High Grade"))
device = DEVICE_SEGA_VIRTUA_STICK_HIGH_GRADE;
strlcpy(name_buf, "Sega Virtua Stick", sizeof(name_buf));
else if (strstr(device_name, "TTT THT Arcade console 2P USB Play"))
device = DEVICE_TTT_THT_ARCADE;
else if (strstr(device_name, "TOMMO NEOGEOX Arcade Stick"))

View File

@ -321,23 +321,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
android->keycode_lut[AKEYCODE_ESCAPE] |= ((RARCH_QUIT_KEY+1) << shift);
break;
case DEVICE_SEGA_VIRTUA_STICK_HIGH_GRADE:
g_settings.input.device[port] = device;
strlcpy(g_settings.input.device_names[port], "Sega Virtua Stick",
sizeof(g_settings.input.device_names[port]));
android->keycode_lut[AKEYCODE_BUTTON_A] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift);
android->keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift);
android->keycode_lut[AKEYCODE_BUTTON_B] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
android->keycode_lut[AKEYCODE_BUTTON_C] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift);
android->keycode_lut[AKEYCODE_BUTTON_Z] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift);
android->keycode_lut[AKEYCODE_BUTTON_R1] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift);
android->keycode_lut[AKEYCODE_BUTTON_Y] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift);
android->keycode_lut[AKEYCODE_BUTTON_L1] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift);
android->keycode_lut[AKEYCODE_BUTTON_R2] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift);
android->keycode_lut[AKEYCODE_BUTTON_MODE] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
android->keycode_lut[AKEYCODE_BUTTON_L2] |= ((RARCH_MENU_TOGGLE+1) << shift);
break;
case DEVICE_PSMOVE_NAVI:
/* TODO - unfinished */
g_settings.input.device[port] = device;

View File

@ -41,6 +41,25 @@ DECL_AXIS(r_y_plus, -3) \
DECL_AXIS(r_y_minus, +3) \
"input_menu_toggle_btn = 108\n"
// TODO
// Verify if stick works
#define SEGA_VIRTUA_STICK_DEFAULT_BINDS \
DECL_BTN(up, h0up) \
DECL_BTN(down, h0down) \
DECL_BTN(left, h0left) \
DECL_BTN(right, h0right) \
DECL_BTN(y, 96) \
DECL_BTN(x, 99) \
DECL_BTN(b, 97) \
DECL_BTN(a, 98) \
DECL_BTN(r, 101) \
DECL_BTN(r2, 103) \
DECL_BTN(l, 100) \
DECL_BTN(l2, 102) \
DECL_BTN(start, 105) \
DECL_BTN(select, 110) \
"input_menu_toggle_btn = 104\n"
// TODO
// - D-pad - verify if it works
#define SUPER_SMARTJOY2_DEFAULT_BINDS \
@ -554,6 +573,10 @@ const char* const input_builtin_autoconfs[] =
"input_driver = \"android\" \n"
XBOX360_DEFAULT_BINDS,
"input_device = \"Sega Virtua Stick\" \n"
"input_driver = \"android\" \n"
SEGA_VIRTUA_STICK_DEFAULT_BINDS,
"input_device = \"PlayStation2 WiseGroup\" \n"
"input_driver = \"android\" \n"
PS2_WISEGROUP_DEFAULT_BINDS,