mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-26 05:16:18 +00:00
(Android) Add Supersmart joy 2 default binds
This commit is contained in:
parent
cc5ac95449
commit
a639d85aff
@ -423,7 +423,7 @@ static void handle_hotplug(void *data, unsigned *port, unsigned id,
|
||||
else if (strstr(device_name, "HuiJia USB GamePad"))
|
||||
strlcpy(name_buf, "HuiJia", sizeof(name_buf));
|
||||
else if (strstr(device_name, "Smartjoy Family Super Smartjoy 2"))
|
||||
device = DEVICE_SUPER_SMARTJOY;
|
||||
strlcpy(name_buf, "Super Smartjoy 2", sizeof(name_buf));
|
||||
else if (strstr(device_name, "Jess Tech Dual Analog Rumble Pad"))
|
||||
device = DEVICE_SAITEK_RUMBLE_P480;
|
||||
else if (strstr(device_name, "mtk-kpd"))
|
||||
|
@ -223,20 +223,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_SUPER_SMARTJOY:
|
||||
g_settings.input.device[port] = device;
|
||||
strlcpy(g_settings.input.device_names[port], "Super Smartjoy",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift);
|
||||
break;
|
||||
case DEVICE_SAITEK_RUMBLE_P480:
|
||||
g_settings.input.device[port] = device;
|
||||
strlcpy(g_settings.input.device_names[port], "Saitek Rumble P480",
|
||||
@ -370,29 +356,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
android->keycode_lut[AKEYCODE_BUTTON_14] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_UNKNOWN] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift);
|
||||
break;
|
||||
case DEVICE_JXD_S7300B:
|
||||
g_settings.input.device[port] = device;
|
||||
strlcpy(g_settings.input.device_names[port], "JXD S7300B",
|
||||
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_Y] |= ((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_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_L2] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_R2] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift);
|
||||
|
||||
android->keycode_lut[AKEYCODE_ENTER] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_SPACE] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
|
||||
break;
|
||||
case DEVICE_IDROID_CON:
|
||||
g_settings.input.device[port] = device;
|
||||
strlcpy(g_settings.input.device_names[port], "i.droid",
|
||||
|
@ -41,6 +41,22 @@ DECL_AXIS(r_y_plus, -3) \
|
||||
DECL_AXIS(r_y_minus, +3) \
|
||||
"input_menu_toggle_btn = 108\n"
|
||||
|
||||
// TODO
|
||||
// - D-pad - verify if it works
|
||||
#define SUPER_SMARTJOY2_DEFAULT_BINDS \
|
||||
DECL_BTN(a, 189) \
|
||||
DECL_BTN(b, 190) \
|
||||
DECL_BTN(x, 188) \
|
||||
DECL_BTN(y, 191) \
|
||||
DECL_BTN(select, 192) \
|
||||
DECL_BTN(start, 193) \
|
||||
DECL_BTN(up, h0up) \
|
||||
DECL_BTN(down, h0down) \
|
||||
DECL_BTN(left, h0left) \
|
||||
DECL_BTN(right, h0right) \
|
||||
DECL_BTN(l, 194) \
|
||||
DECL_BTN(r, 195)
|
||||
|
||||
#define ZEUS_DEFAULT_BINDS \
|
||||
DECL_BTN(a, 4) \
|
||||
DECL_BTN(b, 23) \
|
||||
@ -510,5 +526,9 @@ const char* const input_builtin_autoconfs[] =
|
||||
"input_driver = \"android\" \n"
|
||||
HUIJIA_DEFAULT_BINDS,
|
||||
|
||||
"input_device = \"Super Smartjoy 2\" \n"
|
||||
"input_driver = \"android\" \n"
|
||||
SUPER_SMARTJOY2_DEFAULT_BINDS,
|
||||
|
||||
NULL
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user