From d07c3a6e59cc052b5097912912ddea4aaaeefa5f Mon Sep 17 00:00:00 2001 From: Bezier89 Date: Sun, 12 Jan 2014 12:10:54 -0800 Subject: [PATCH 1/2] Update input_android.c --- android/native/jni/input_android.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/android/native/jni/input_android.c b/android/native/jni/input_android.c index 70542f552c..68f0084227 100644 --- a/android/native/jni/input_android.c +++ b/android/native/jni/input_android.c @@ -811,27 +811,6 @@ static void android_input_set_keybinds(void *data, unsigned device, android->keycode_lut[AKEYCODE_BUTTON_THUMBR] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift); android->keycode_lut[AKEYCODE_BUTTON_1] |= ((RARCH_MENU_TOGGLE+1) << shift); break; - case DEVICE_MOGA: - g_settings.input.device[port] = device; - android->dpad_emulation[port] = ANALOG_DPAD_NONE; - strlcpy(g_settings.input.device_names[port], "MOGA", - sizeof(g_settings.input.device_names[port])); - - 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_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - - android->keycode_lut[AKEYCODE_BUTTON_START] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_SELECT] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - - android->keycode_lut[AKEYCODE_BUTTON_B] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_Y] |= ((RETRO_DEVICE_ID_JOYPAD_X+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_SEGA_VIRTUA_STICK_HIGH_GRADE: g_settings.input.device[port] = device; strlcpy(g_settings.input.device_names[port], "Sega Virtua Stick", @@ -1373,6 +1352,7 @@ static void android_input_set_keybinds(void *data, unsigned device, case ICADE_PROFILE_MOGA_HERO_POWER: strlcpy(g_settings.input.device_names[port], "Moga Hero Power", sizeof(g_settings.input.device_names[port])); + android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG; 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); From 031d3f829b41fc9e374aea738b3b82d0f07f2f44 Mon Sep 17 00:00:00 2001 From: Bezier89 Date: Sun, 12 Jan 2014 12:16:20 -0800 Subject: [PATCH 2/2] Update input_android.c --- android/native/jni/input_android.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/android/native/jni/input_android.c b/android/native/jni/input_android.c index 68f0084227..0d75d03446 100644 --- a/android/native/jni/input_android.c +++ b/android/native/jni/input_android.c @@ -1350,19 +1350,19 @@ static void android_input_set_keybinds(void *data, unsigned device, 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->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG; - 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); + strlcpy(g_settings.input.device_names[port], "Moga Hero Power", + sizeof(g_settings.input.device_names[port])); + android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG; + 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;