(Android) Add JXD S5110B Skelrom to input autodetect

This commit is contained in:
twinaphex 2013-12-16 10:52:26 +01:00
parent b35153855c
commit bfbebaf041
3 changed files with 22 additions and 0 deletions

View File

@ -1141,6 +1141,25 @@ 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_JXD_S5110_SKELROM:
g_settings.input.device[port] = device;
strlcpy(g_settings.input.device_names[port], "JXD S5110 Skelrom",
sizeof(g_settings.input.device_names[port]));
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
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_X] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift);
android->keycode_lut[AKEYCODE_BUTTON_SELECT] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
android->keycode_lut[AKEYCODE_BUTTON_START] |= ((RETRO_DEVICE_ID_JOYPAD_START+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_L1] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift);
android->keycode_lut[AKEYCODE_BUTTON_R1] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift);
break;
case DEVICE_OUYA:
g_settings.input.device[port] = device;
strlcpy(g_settings.input.device_names[port], "OUYA",

View File

@ -203,6 +203,8 @@ void input_autodetect_setup(void *data, char *msg, size_t sizeof_msg, unsigned p
device = DEVICE_ARCHOS_GAMEPAD;
else if (strstr(name_buf, "matrix_keyboard"))
device = DEVICE_JXD_S5110;
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;
else if (strstr(name_buf, "Broadcom Bluetooth HID"))

View File

@ -241,6 +241,7 @@ enum input_devices
DEVICE_SZMY_POWER_DUAL_BOX_WII,
DEVICE_ARCHOS_GAMEPAD,
DEVICE_JXD_S5110,
DEVICE_JXD_S5110_SKELROM,
DEVICE_XPERIA_PLAY,
DEVICE_BROADCOM_BLUETOOTH_HID,
DEVICE_THRUST_PREDATOR,