(Android) Add Gamestop Wireless, Tomee NES USB, and Thrustmaster T Mini

Wireless to autodetection list
This commit is contained in:
twinaphex 2013-05-26 01:13:24 +02:00
parent 2613cf1b77
commit cb84451542
5 changed files with 56 additions and 0 deletions

View File

@ -1197,6 +1197,28 @@ static void android_input_set_keybinds(void *data, unsigned device,
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 ICADE_PROFILE_GAMESTOP_WIRELESS:
keycode_lut[AKEYCODE_W] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift);
keycode_lut[AKEYCODE_S] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift);
keycode_lut[AKEYCODE_A] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift);
keycode_lut[AKEYCODE_D] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift);
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_3] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift);
keycode_lut[AKEYCODE_4] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift);
keycode_lut[AKEYCODE_1] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
keycode_lut[AKEYCODE_2] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift);
keycode_lut[AKEYCODE_5] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift);
keycode_lut[AKEYCODE_7] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift);
keycode_lut[AKEYCODE_ESCAPE] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
keycode_lut[AKEYCODE_ENTER] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift);
keycode_lut[AKEYCODE_6] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift);
keycode_lut[AKEYCODE_8] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift);
keycode_lut[AKEYCODE_9] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift);
keycode_lut[AKEYCODE_0] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift);
break;
}
}
break;
@ -1232,6 +1254,32 @@ static void android_input_set_keybinds(void *data, unsigned device,
keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift);
break;
case DEVICE_TOMEE_NES_USB:
g_settings.input.device[port] = device;
strlcpy(g_settings.input.device_names[port], "Tomee NES USB",
sizeof(g_settings.input.device_names[port]));
keycode_lut[AKEYCODE_BUTTON_R2]|= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift);
keycode_lut[AKEYCODE_BUTTON_L2]|= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
keycode_lut[AKEYCODE_BUTTON_A]|= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
keycode_lut[AKEYCODE_BUTTON_B]|= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift);
break;
case DEVICE_THRUSTMASTER_T_MINI:
g_settings.input.device[port] = device;
strlcpy(g_settings.input.device_names[port], "Thrustmaster T Mini",
sizeof(g_settings.input.device_names[port]));
keycode_lut[AKEYCODE_BUTTON_R2]|= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift);
keycode_lut[AKEYCODE_BUTTON_L2]|= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
keycode_lut[AKEYCODE_BUTTON_A]|= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift);
keycode_lut[AKEYCODE_BUTTON_X]|= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift);
keycode_lut[AKEYCODE_BUTTON_B]|= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
keycode_lut[AKEYCODE_BUTTON_C]|= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift);
keycode_lut[AKEYCODE_BUTTON_Y]|= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift);
keycode_lut[AKEYCODE_BUTTON_Z]|= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift);
keycode_lut[AKEYCODE_BUTTON_L2]|= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift);
keycode_lut[AKEYCODE_BUTTON_R1]|= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift);
break;
case DEVICE_MOGA_IME:
g_settings.input.device[port] = device;
strlcpy(g_settings.input.device_names[port], "Moga IME",

View File

@ -191,6 +191,10 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned
device = DEVICE_THRUST_PREDATOR;
else if (strstr(name_buf, "DragonRise"))
device = DEVICE_DRAGONRISE;
else if (strstr(name_buf, "Thrustmaster T Mini"))
device = DEVICE_THRUSTMASTER_T_MINI;
else if (strstr(name_buf, "2Axes 11Keys Game Pad"))
device = DEVICE_TOMEE_NES_USB;
if (strstr(current_ime, "net.obsidianx.android.mogaime"))
{

View File

@ -24,6 +24,7 @@
enum {
ICADE_PROFILE_RED_SAMURAI = 0,
ICADE_PROFILE_IPEGA_PG9017,
ICADE_PROFILE_GAMESTOP_WIRELESS,
} icade_profile_enums;
enum {

View File

@ -33,6 +33,7 @@
<string-array name="icade_profiles">
<item>Red Samurai</item>
<item>iPega PG-9017</item>
<item>Gamestop Wireless</item>
</string-array>
<string-array name="icade_profiles_values">

View File

@ -262,6 +262,8 @@ enum input_devices
DEVICE_CCPCREATIONS_WIIUSE_IME,
DEVICE_KEYBOARD_RETROPAD,
DEVICE_OUYA,
DEVICE_TOMEE_NES_USB,
DEVICE_THRUSTMASTER_T_MINI,
#elif defined(GEKKO)
DEVICE_GAMECUBE = 0,
#ifdef HW_RVL