(Android) Add dancingpixelstudios Sixaxis IME app binds

This commit is contained in:
twinaphex 2012-12-31 22:26:44 +01:00
parent c76ee4c6b4
commit 8099d76943

View File

@ -198,6 +198,30 @@ void input_autodetect_setup(unsigned port, unsigned id, int source)
}
goto do_exit;
}
else if (strstr(current_ime, "com.dancingpixelstudios.sixaxiscontroller"))
{
snprintf(msg, sizeof(msg), "RetroPad #%d is: SixAxis Bluetooth (IME).\n", port);
snprintf(name_buf, sizeof(name_buf), "dancingpixelstudios.SixAxis");
g_settings.input.dpad_emulation[port] = DPAD_EMULATION_NONE;
keycode_lut[AKEYCODE_DPAD_UP] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift);
keycode_lut[AKEYCODE_DPAD_DOWN] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift);
keycode_lut[AKEYCODE_DPAD_LEFT] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift);
keycode_lut[AKEYCODE_DPAD_RIGHT]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift);
keycode_lut[AKEYCODE_SOFT_LEFT] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift);
keycode_lut[AKEYCODE_5] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift);
keycode_lut[AKEYCODE_6] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift);
keycode_lut[AKEYCODE_7] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift);
keycode_lut[AKEYCODE_BACK] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
keycode_lut[AKEYCODE_DPAD_CENTER] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift);
keycode_lut[AKEYCODE_8] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift);
keycode_lut[AKEYCODE_9] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift);
keycode_lut[AKEYCODE_0] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift);
keycode_lut[AKEYCODE_3] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
keycode_lut[AKEYCODE_2] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift);
keycode_lut[AKEYCODE_1] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift);
keycode_lut[AKEYCODE_HOME] |= ((RARCH_QUIT_KEY+1) << shift);
goto do_exit;
}
input_autodetect_get_device_name(name_buf, sizeof(name_buf), id);