Added an iCade profile for the Moga Hero Power controller, it might work

with other Moga controllers that have a HID mode.
This commit is contained in:
AridRayne 2013-12-16 08:41:41 -08:00
parent 30379e4abb
commit 721fbeda7e
3 changed files with 16 additions and 0 deletions

View File

@ -1362,6 +1362,19 @@ static void android_input_set_keybinds(void *data, unsigned device,
android->keycode_lut[AKEYCODE_9] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift);
android->keycode_lut[AKEYCODE_0] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift);
break;
case ICADE_PROFILE_MOGA_HERO_POWER:
strlcpy(g_settings.input.device_names[port], "Moga Hero Power",
sizeof(g_settings.input.device_names[port]));
android->keycode_lut[AKEYCODE_NUMPAD_LCK_0] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
android->keycode_lut[AKEYCODE_NUMPAD_LCK_1] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift);
android->keycode_lut[AKEYCODE_NUMPAD_LCK_3] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift);
android->keycode_lut[AKEYCODE_NUMPAD_LCK_4] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift);
android->keycode_lut[AKEYCODE_NUMPAD_LCK_6] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift);
android->keycode_lut[AKEYCODE_NUMPAD_LCK_7] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift);
android->keycode_lut[AKEYCODE_BACK] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
android->keycode_lut[AKEYCODE_OTHR_108] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift);
android->keycode_lut[AKEYCODE_BUTTON_THUMBL] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift);
android->keycode_lut[AKEYCODE_BUTTON_THUMBR] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift);
}
}
break;

View File

@ -27,6 +27,7 @@ enum {
ICADE_PROFILE_IPEGA_PG9017_MODE2,
ICADE_PROFILE_GAMESTOP_WIRELESS,
ICADE_PROFILE_G910,
ICADE_PROFILE_MOGA_HERO_POWER,
} icade_profile_enums;
enum {

View File

@ -52,6 +52,7 @@
<item>iPega PG-9017 (Mode 2)</item>
<item>Gamestop Wireless</item>
<item>G910</item>
<item >Moga Hero Power</item>
</string-array>
<string-array name="icade_profiles_values" translatable="false">
@ -60,6 +61,7 @@
<item>2</item>
<item>3</item>
<item>4</item>
<item >5</item>
</string-array>
<string-array name="key_bind_values" translatable="false">