mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 03:32:46 +00:00
(Android) Add default binds for MUCH iRead i5 and FC30
This commit is contained in:
parent
7dae96687d
commit
b7b0e520ef
@ -427,7 +427,7 @@ static void handle_hotplug(void *data, unsigned *port, unsigned id,
|
||||
else if (strstr(device_name, "Jess Tech Dual Analog Rumble Pad"))
|
||||
device = DEVICE_SAITEK_RUMBLE_P480;
|
||||
else if (strstr(device_name, "mtk-kpd"))
|
||||
device = DEVICE_MUCH_IREADGO_I5;
|
||||
strlcpy(name_buf, "MUCH iReadyGo i5", sizeof(name_buf));
|
||||
else if (strstr(device_name, "Wikipad"))
|
||||
strlcpy(name_buf, "Wikipad", sizeof(name_buf));
|
||||
else if (strstr(device_name, "Microsoft"))
|
||||
@ -478,7 +478,7 @@ static void handle_hotplug(void *data, unsigned *port, unsigned id,
|
||||
else if (strstr(device_name, "BUFFALO BGC-FC801"))
|
||||
device = DEVICE_BUFFALO_BGC_FC801;
|
||||
else if (strstr(device_name, "8Bitdo FC30"))
|
||||
device = DEVICE_FC30_GAMEPAD;
|
||||
strlcpy(name_buf, "FC30 Gamepad", sizeof(name_buf));
|
||||
else if (strstr(device_name, "RetroUSB.com RetroPad"))
|
||||
device = DEVICE_RETROUSB_RETROPAD;
|
||||
else if (strstr(device_name, "RetroUSB.com SNES RetroPort"))
|
||||
|
@ -812,43 +812,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
android->keycode_lut[AKEYCODE_BUTTON_L1]|= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_R1]|= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift);
|
||||
break;
|
||||
case DEVICE_MUCH_IREADGO_I5:
|
||||
g_settings.input.device[port] = device;
|
||||
strlcpy(g_settings.input.device_names[port], "MUCH iReadyGo i5",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->keycode_lut[AKEYCODE_DPAD_UP] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_DPAD_DOWN] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_DPAD_LEFT] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_DPAD_RIGHT]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift);
|
||||
|
||||
android->keycode_lut[AKEYCODE_BUTTON_B] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_DPAD_CENTER] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_Y] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_L1] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_R1] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift);
|
||||
|
||||
break;
|
||||
case DEVICE_FC30_GAMEPAD:
|
||||
g_settings.input.device[port] = device;
|
||||
strlcpy(g_settings.input.device_names[port], "FC30 Gamepad",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->keycode_lut[AKEYCODE_DPAD_UP] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_DPAD_DOWN] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_DPAD_LEFT] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_DPAD_RIGHT]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift);
|
||||
|
||||
android->keycode_lut[AKEYCODE_BUTTON_A] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_B] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_Y] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_L1] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_R1] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_C] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_START] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift);
|
||||
break;
|
||||
case DEVICE_CCPCREATIONS_WIIUSE_IME:
|
||||
g_settings.input.device[port] = device;
|
||||
strlcpy(g_settings.input.device_names[port], "ccpCreations WiiUse IME",
|
||||
|
@ -57,6 +57,20 @@ DECL_BTN(right, h0right) \
|
||||
DECL_BTN(l, 194) \
|
||||
DECL_BTN(r, 195)
|
||||
|
||||
#define FC30_GAMEPAD_DEFAULT_BINDS \
|
||||
DECL_BTN(up, 19) \
|
||||
DECL_BTN(down, 20) \
|
||||
DECL_BTN(left, 21) \
|
||||
DECL_BTN(right, 22) \
|
||||
DECL_BTN(a, 96) \
|
||||
DECL_BTN(b, 97) \
|
||||
DECL_BTN(x, 99) \
|
||||
DECL_BTN(y, 100) \
|
||||
DECL_BTN(l, 102) \
|
||||
DECL_BTN(r, 103) \
|
||||
DECL_BTN(select, 98) \
|
||||
DECL_BTN(start, 108)
|
||||
|
||||
#define ZEUS_DEFAULT_BINDS \
|
||||
DECL_BTN(a, 4) \
|
||||
DECL_BTN(b, 23) \
|
||||
@ -72,6 +86,28 @@ DECL_BTN(l, 102) \
|
||||
DECL_BTN(r, 103) \
|
||||
"input_menu_toggle_btn = 82\n"
|
||||
|
||||
// TODO
|
||||
// - Analog sticks - verify if they work
|
||||
#define MUCH_IREADYGO_I5_DEFAULT_BINDS \
|
||||
DECL_BTN(a, 97) \
|
||||
DECL_BTN(b, 23) \
|
||||
DECL_BTN(x, 100) \
|
||||
DECL_BTN(y, 99) \
|
||||
DECL_BTN(up, 19) \
|
||||
DECL_BTN(down, 20) \
|
||||
DECL_BTN(left, 21) \
|
||||
DECL_BTN(right, 22) \
|
||||
DECL_BTN(l, 102) \
|
||||
DECL_BTN(r, 103) \
|
||||
DECL_AXIS(l_x_plus, +0) \
|
||||
DECL_AXIS(l_x_minus, -0) \
|
||||
DECL_AXIS(l_y_plus, +1) \
|
||||
DECL_AXIS(l_y_minus, -1) \
|
||||
DECL_AXIS(r_x_plus, +2) \
|
||||
DECL_AXIS(r_x_minus, -2) \
|
||||
DECL_AXIS(r_y_plus, -3) \
|
||||
DECL_AXIS(r_y_minus, +3)
|
||||
|
||||
// TODO
|
||||
// - Analog sticks - verify if they work
|
||||
// - L2 / R2 buttons
|
||||
@ -509,6 +545,10 @@ const char* const input_builtin_autoconfs[] =
|
||||
"input_device = \"SideWinder Classic\" \n"
|
||||
"input_driver = \"android\" \n"
|
||||
SIDEWINDER_CLASSIC_DEFAULT_BINDS,
|
||||
|
||||
"input_device = \"MUCH iReadyGo i5\" \n"
|
||||
"input_driver = \"android\" \n"
|
||||
MUCH_IREADYGO_I5_DEFAULT_BINDS
|
||||
|
||||
"input_device = \"XBox 360\" \n"
|
||||
"input_driver = \"android\" \n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user