(Android) Add Logitech Precision Gamepad to input autodetection list

This commit is contained in:
twinaphex 2013-06-16 18:25:17 +02:00
parent ef2406e8f6
commit 65c52b2adb
3 changed files with 21 additions and 0 deletions

View File

@ -365,6 +365,24 @@ static void android_input_set_keybinds(void *data, unsigned device,
keycode_lut[AKEYCODE_BACK] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
keycode_lut[AKEYCODE_BUTTON_START] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift);
break;
case DEVICE_LOGITECH_PRECISION_GAMEPAD:
g_settings.input.device[port] = device;
strlcpy(g_settings.input.device_names[port], "Logitech Precision",
sizeof(g_settings.input.device_names[port]));
keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift);
keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift);
keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift);
keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift);
keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift);
keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift);
keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift);
keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
keycode_lut[AKEYCODE_BUTTON_10] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift);
break;
case DEVICE_GAMEMID:
g_settings.input.device[port] = device;
g_settings.input.dpad_emulation[port] = ANALOG_DPAD_NONE;

View File

@ -109,6 +109,8 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned
device = DEVICE_LOGITECH_RUMBLEPAD2;
else if (strstr(name_buf, "Logitech") && strstr(name_buf, "Dual Action"))
device = DEVICE_LOGITECH_DUAL_ACTION;
else if (strstr(name_buf, "Logitech") && strstr(name_buf, "Precision"))
device = DEVICE_LOGITECH_PRECISION_GAMEPAD;
else if (strstr(name_buf, "shooter-keypad"))
device = DEVICE_ICONTROLPAD_BLUEZ_IME;
else if (strstr(name_buf, "SEGA VIRTUA STICK High Grade"))

View File

@ -219,6 +219,7 @@ enum input_devices
DEVICE_NONE = 0,
DEVICE_LOGITECH_RUMBLEPAD2,
DEVICE_LOGITECH_DUAL_ACTION,
DEVICE_LOGITECH_PRECISION_GAMEPAD,
DEVICE_ICONTROLPAD_BLUEZ_IME,
DEVICE_TTT_THT_ARCADE,
DEVICE_TOMMO_NEOGEOX_ARCADE,