diff --git a/input/android_input.c.rem b/input/android_input.c.rem index 98dab60995..efa415160f 100644 --- a/input/android_input.c.rem +++ b/input/android_input.c.rem @@ -23,79 +23,79 @@ static void android_input_set_keybinds(void *data, unsigned device, strlcpy(g_settings.input.device_names[port], "Logitech Dual Action", sizeof(g_settings.input.device_names[port])); - android->keycode_lut[AKEYCODE_BUTTON_A] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_Y] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_B] |= ((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); - android->keycode_lut[AKEYCODE_BUTTON_L2] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_R2] |= ((RETRO_DEVICE_ID_JOYPAD_R2+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); - android->keycode_lut[AKEYCODE_BUTTON_SELECT] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BACK] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_START] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[96] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[99] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[100] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[97] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[102] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[103] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[104] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + android->keycode_lut[105] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[106] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift); + android->keycode_lut[107] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift); + android->keycode_lut[109] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[4] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[108] |= ((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])); - android->keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[188] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[190] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[189] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[191] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[192] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[193] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[194] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + android->keycode_lut[195] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_10] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[196] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[197] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); break; case DEVICE_ICONTROLPAD_HID_JOYSTICK: g_settings.input.device[port] = device; strlcpy(g_settings.input.device_names[port], "iControlPad HID Joystick profile", sizeof(g_settings.input.device_names[port])); - android->keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_14] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_13] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_11] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_12] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_10] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_15] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[188] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[191] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[190] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[189] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[201] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[200] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[198] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[199] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[197] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[196] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[192] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[202] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); break; case DEVICE_ICONTROLPAD_BLUEZ_IME: g_settings.input.device[port] = device; strlcpy(g_settings.input.device_names[port], "iControlPad SPP profile (using Bluez IME)", 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_X] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_B] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_A] |= ((RETRO_DEVICE_ID_JOYPAD_Y+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); - android->keycode_lut[AKEYCODE_BUTTON_START] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_SELECT] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[19] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[20] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[21] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[22] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[99] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[97] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[96] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[100] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[102] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[103] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[108] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[109] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); /* left analog stick */ - android->keycode_lut[AKEYCODE_W] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); - android->keycode_lut[AKEYCODE_S] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); - android->keycode_lut[AKEYCODE_A] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); - android->keycode_lut[AKEYCODE_D] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[51] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[47] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[29] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[32] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); /* right analog stick - TODO */ // Left - 11 @@ -109,35 +109,35 @@ static void android_input_set_keybinds(void *data, unsigned device, sizeof(g_settings.input.device_names[port])); /* same as Rumblepad 2 - merge? */ - //android->keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + //android->keycode_lut[194] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[188] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[189] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[192] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[193] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[190] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[194] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[191] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[195] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[196] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); /* TODO - unsure about pad 2 still */ #if 0 - android->keycode_lut[AKEYCODE_BUTTON_Z] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_Y] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_C] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[101] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[100] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[98] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[99] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_11] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_12] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_13] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_14] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_15] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_16] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_A] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_B] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_C] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[198] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[199] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[200] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[201] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[202] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[203] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[96] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + android->keycode_lut[97] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[98] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[99] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); #endif break; case DEVICE_MADCATZ_PC_USB_STICK: @@ -145,17 +145,17 @@ static void android_input_set_keybinds(void *data, unsigned device, strlcpy(g_settings.input.device_names[port], "Madcatz PC USB Stick", sizeof(g_settings.input.device_names[port])); - android->keycode_lut[AKEYCODE_BUTTON_A] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_B] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_C] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_Y] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_Z] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); /* request hack */ - android->keycode_lut[AKEYCODE_BUTTON_L1] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_R1] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); /* request hack */ - android->keycode_lut[AKEYCODE_BUTTON_L2] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_R2] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_MODE] |= ((RARCH_QUIT_KEY+1) << shift); + android->keycode_lut[96] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[97] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[98] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[99] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[100] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[101] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); /* request hack */ + android->keycode_lut[102] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + android->keycode_lut[103] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); /* request hack */ + android->keycode_lut[104] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[105] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[110] |= ((RARCH_QUIT_KEY+1) << shift); break; case DEVICE_LOGICOOL_RUMBLEPAD2: g_settings.input.device[port] = device; @@ -164,126 +164,126 @@ static void android_input_set_keybinds(void *data, unsigned device, // Rumblepad 2 DInput */ /* TODO: Add L3/R3 */ - android->keycode_lut[AKEYCODE_BUTTON_B] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_C] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[97] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[98] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_A] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[99] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[96] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_L2] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_R2] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[104] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[105] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_Y] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_Z] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_L1] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_R1] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[100] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[101] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[102] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + android->keycode_lut[103] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); break; case DEVICE_IDROID_X360: g_settings.input.device[port] = device; strlcpy(g_settings.input.device_names[port], "iDroid x360", 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_INSERT] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_MINUS] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_SLASH] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_MOVE_END] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_LEFT_BRACKET] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_FORWARD_DEL] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_MEDIA_PLAY] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - android->keycode_lut[AKEYCODE_EQUALS] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_MENU] |= ((RARCH_MENU_TOGGLE+1) << shift); + android->keycode_lut[19] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[20] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[21] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[22] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[124] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[69] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[76] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[123] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[71] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[112] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[126] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[70] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[82] |= ((RARCH_MENU_TOGGLE+1) << shift); // Left Analog Up: 152 // Left Analog Down: 146 // Left Analog Right: 150 // Left Analog Left: 148 - // Right Analog Up: 92 (AKEYCODE_PAGE_UP) - // Right Analog Down: 93 (AKEYCODE_PAGE_DOWN) - // Right Analog Right: 113 (AKEYCODE_CTRL_LEFT) - // Right Analog Left: 72 (AKEYCODE_RIGHT_BRACKET) - android->keycode_lut[AKEYCODE_NUMPAD_8] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); - android->keycode_lut[AKEYCODE_NUMPAD_2] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); - android->keycode_lut[AKEYCODE_NUMPAD_6] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); - android->keycode_lut[AKEYCODE_NUMPAD_4] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + // Right Analog Up: 92 (92) + // Right Analog Down: 93 (93) + // Right Analog Right: 113 (113) + // Right Analog Left: 72 (72) + android->keycode_lut[152] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[146] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[150] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[148] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); break; case DEVICE_ZEEMOTE_STEELSERIES: g_settings.input.device[port] = device; strlcpy(g_settings.input.device_names[port], "Zeemote Steelseries", sizeof(g_settings.input.device_names[port])); - android->keycode_lut[AKEYCODE_BUTTON_A] |= ((RETRO_DEVICE_ID_JOYPAD_B+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_X] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_MODE] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_START] |= ((RETRO_DEVICE_ID_JOYPAD_START+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); + android->keycode_lut[96] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[97] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[100] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[99] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[110] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[108] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[102] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[103] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); break; case DEVICE_SAITEK_RUMBLE_P480: g_settings.input.device[port] = device; strlcpy(g_settings.input.device_names[port], "Saitek Rumble P480", sizeof(g_settings.input.device_names[port])); - android->keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_10] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_11] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_12] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift); + android->keycode_lut[190] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[188] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[196] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[197] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[191] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[189] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[192] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[194] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[193] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + android->keycode_lut[195] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[198] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift); + android->keycode_lut[199] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift); break; case DEVICE_JCPS102_PLAYSTATION2: g_settings.input.device[port] = device; strlcpy(g_settings.input.device_names[port], "JCPS102 PlayStation2", sizeof(g_settings.input.device_names[port])); - android->keycode_lut[AKEYCODE_BUTTON_13] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_15] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_16] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_14] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_10] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_11] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_12] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift); + android->keycode_lut[200] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[202] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[203] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[201] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[191] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[188] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[192] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[194] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[190] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[189] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[193] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[195] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[197] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[196] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[198] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift); + android->keycode_lut[199] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift); break; case DEVICE_GENERIC_PLAYSTATION2_CONVERTER: g_settings.input.device[port] = device; strlcpy(g_settings.input.device_names[port], "Generic PlayStation2", sizeof(g_settings.input.device_names[port])); - android->keycode_lut[AKEYCODE_BUTTON_13] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_15] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_16] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_14] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_10] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_11] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_12] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift); + android->keycode_lut[200] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[202] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[203] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[201] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[191] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[188] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[192] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[194] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[190] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[189] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[193] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[195] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + android->keycode_lut[197] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[196] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[198] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift); + android->keycode_lut[199] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift); break; case DEVICE_KEYBOARD_RETROPAD: g_settings.input.device[port] = device; @@ -292,34 +292,34 @@ static void android_input_set_keybinds(void *data, unsigned device, // Keyboard // TODO: Map L2/R2/L3/R3 - android->keycode_lut[AKEYCODE_Z] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_A] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_SHIFT_RIGHT] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_ENTER] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - 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_X] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_S] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_Q] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_W] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[54] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[29] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[60] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[66] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[19] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[20] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[21] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[22] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[52] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[47] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[45] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[51] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); /* Misc control scheme */ - android->keycode_lut[AKEYCODE_F1] |= ((RARCH_MENU_TOGGLE + 1) << shift); - android->keycode_lut[AKEYCODE_F2] |= ((RARCH_SAVE_STATE_KEY+1) << shift); - android->keycode_lut[AKEYCODE_F4] |= ((RARCH_LOAD_STATE_KEY+1) << shift); - android->keycode_lut[AKEYCODE_F7] |= ((RARCH_STATE_SLOT_PLUS+1) << shift); - android->keycode_lut[AKEYCODE_F6] |= ((RARCH_STATE_SLOT_MINUS+1) << shift); - android->keycode_lut[AKEYCODE_SPACE] |= ((RARCH_FAST_FORWARD_KEY+1) << shift); - android->keycode_lut[AKEYCODE_L] |= ((RARCH_FAST_FORWARD_HOLD_KEY+1) << shift); - android->keycode_lut[AKEYCODE_BREAK] |= ((RARCH_PAUSE_TOGGLE+1) << shift); - android->keycode_lut[AKEYCODE_K] |= ((RARCH_FRAMEADVANCE+1) << shift); - android->keycode_lut[AKEYCODE_H] |= ((RARCH_RESET+1) << shift); - android->keycode_lut[AKEYCODE_R] |= ((RARCH_REWIND+1) << shift); - android->keycode_lut[AKEYCODE_F9] |= ((RARCH_MUTE+1) << shift); + android->keycode_lut[131] |= ((RARCH_MENU_TOGGLE + 1) << shift); + android->keycode_lut[132] |= ((RARCH_SAVE_STATE_KEY+1) << shift); + android->keycode_lut[134] |= ((RARCH_LOAD_STATE_KEY+1) << shift); + android->keycode_lut[137] |= ((RARCH_STATE_SLOT_PLUS+1) << shift); + android->keycode_lut[136] |= ((RARCH_STATE_SLOT_MINUS+1) << shift); + android->keycode_lut[62] |= ((RARCH_FAST_FORWARD_KEY+1) << shift); + android->keycode_lut[40] |= ((RARCH_FAST_FORWARD_HOLD_KEY+1) << shift); + android->keycode_lut[121] |= ((RARCH_PAUSE_TOGGLE+1) << shift); + android->keycode_lut[39] |= ((RARCH_FRAMEADVANCE+1) << shift); + android->keycode_lut[36] |= ((RARCH_RESET+1) << shift); + android->keycode_lut[46] |= ((RARCH_REWIND+1) << shift); + android->keycode_lut[139] |= ((RARCH_MUTE+1) << shift); - android->keycode_lut[AKEYCODE_ESCAPE] |= ((RARCH_QUIT_KEY+1) << shift); + android->keycode_lut[111] |= ((RARCH_QUIT_KEY+1) << shift); break; case DEVICE_PSMOVE_NAVI: /* TODO - unfinished */ @@ -327,16 +327,16 @@ static void android_input_set_keybinds(void *data, unsigned device, strlcpy(g_settings.input.device_names[port], "PS Move Navi", sizeof(g_settings.input.device_names[port])); - android->keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[194] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[195] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[192] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[193] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_11] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_15] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_14] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[198] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[196] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + android->keycode_lut[189] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift); + android->keycode_lut[202] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[201] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); android->keycode_lut[AKEYCODE_UNKNOWN] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); break; case DEVICE_IDROID_CON: @@ -344,38 +344,38 @@ static void android_input_set_keybinds(void *data, unsigned device, strlcpy(g_settings.input.device_names[port], "i.droid", sizeof(g_settings.input.device_names[port])); - android->keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_10] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_11] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_12] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift); + android->keycode_lut[189] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[190] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[188] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[191] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[192] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[193] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[194] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + android->keycode_lut[195] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[196] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[197] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[198] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift); + android->keycode_lut[199] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift); break; case DEVICE_NYKO_PLAYPAD_PRO: g_settings.input.device[port] = device; strlcpy(g_settings.input.device_names[port], "Nyko Playpad Pro", 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_X] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_Y] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_A] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_B] |= ((RETRO_DEVICE_ID_JOYPAD_A+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); - android->keycode_lut[AKEYCODE_BUTTON_START] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - android->keycode_lut[AKEYCODE_BACK] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+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); + android->keycode_lut[19] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[20] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[21] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[22] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[99] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[100] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[96] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[97] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[102] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[103] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[108] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[4] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[106] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift); + android->keycode_lut[107] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift); break; case DEVICE_ONLIVE_WIRELESS_CONTROLLER: g_settings.input.device[port] = device; @@ -384,15 +384,15 @@ static void android_input_set_keybinds(void *data, unsigned device, /* TODO - Does D-pad work as D-pad? */ - android->keycode_lut[AKEYCODE_BUTTON_L1] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - android->keycode_lut[AKEYCODE_BACK] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[102] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[4] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_Y] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_A] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_B] |= ((RETRO_DEVICE_ID_JOYPAD_A+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); + android->keycode_lut[100] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[99] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[96] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[97] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[102] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[103] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); /* TODO - * LT - find out value @@ -404,157 +404,157 @@ static void android_input_set_keybinds(void *data, unsigned device, strlcpy(g_settings.input.device_names[port], "Genius Maxfire G08XU", sizeof(g_settings.input.device_names[port])); - android->keycode_lut[AKEYCODE_BUTTON_B] |= ((RETRO_DEVICE_ID_JOYPAD_A+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_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_C] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_Y] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_Z] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_L1] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_R1] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[97] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[96] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[99] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[98] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[100] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[101] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[102] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[103] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); break; case DEVICE_USB_2_AXIS_8_BUTTON_GAMEPAD: g_settings.input.device[port] = device; strlcpy(g_settings.input.device_names[port], "USB 2 Axis 8 button", sizeof(g_settings.input.device_names[port])); - android->keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[188] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[189] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[190] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[191] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[192] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[193] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[194] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[195] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); break; case DEVICE_BUFFALO_BGC_FC801: g_settings.input.device[port] = device; strlcpy(g_settings.input.device_names[port], "Buffalo BGC FC801", sizeof(g_settings.input.device_names[port])); - android->keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[188] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[189] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[190] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[191] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[192] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[193] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[194] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[195] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); break; case DEVICE_RETROUSB_RETROPAD: g_settings.input.device[port] = device; strlcpy(g_settings.input.device_names[port], "RetroUSB NES", sizeof(g_settings.input.device_names[port])); - android->keycode_lut[AKEYCODE_BUTTON_B] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_A] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_C] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[97] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[96] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[98] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[99] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); break; case DEVICE_RETROUSB_SNES_RETROPORT: g_settings.input.device[port] = device; strlcpy(g_settings.input.device_names[port], "RetroUSB SNES", sizeof(g_settings.input.device_names[port])); - android->keycode_lut[AKEYCODE_BUTTON_Z] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_B] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_Y] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_A] |= ((RETRO_DEVICE_ID_JOYPAD_Y+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); - android->keycode_lut[AKEYCODE_BUTTON_C] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[101] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[97] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[100] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[96] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[102] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[103] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[98] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[99] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); break; case DEVICE_CYPRESS_USB: g_settings.input.device[port] = device; strlcpy(g_settings.input.device_names[port], "Cypress USB", sizeof(g_settings.input.device_names[port])); - android->keycode_lut[AKEYCODE_BUTTON_A] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_B] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_C] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_Y] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_Z] |= ((RETRO_DEVICE_ID_JOYPAD_L2+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); - android->keycode_lut[AKEYCODE_BUTTON_L2] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[96] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[97] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[98] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[99] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[100] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[101] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + android->keycode_lut[102] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[103] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[104] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); break; case DEVICE_MAYFLASH_WII_CLASSIC: g_settings.input.device[port] = device; strlcpy(g_settings.input.device_names[port], "Mayflash Wii Classic", sizeof(g_settings.input.device_names[port])); - android->keycode_lut[AKEYCODE_BUTTON_12] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_14] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_13] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_15] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[199] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[201] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[200] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[202] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_10] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[190] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[189] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[188] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[191] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[192] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[193] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[194] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + android->keycode_lut[195] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[196] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[197] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); break; case DEVICE_SZMY_POWER_DUAL_BOX_WII: g_settings.input.device[port] = device; strlcpy(g_settings.input.device_names[port], "SZMy Power Dual Box Wii", sizeof(g_settings.input.device_names[port])); - android->keycode_lut[AKEYCODE_BUTTON_13] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_15] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_16] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_14] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[200] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[202] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[203] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[201] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_10] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[189] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[190] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[188] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[191] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[192] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[193] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[194] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + android->keycode_lut[195] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[196] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[197] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); break; case DEVICE_TOODLES_2008_CHIMP: g_settings.input.device[port] = device; strlcpy(g_settings.input.device_names[port], "Toodles 2008 Chimp", sizeof(g_settings.input.device_names[port])); - android->keycode_lut[AKEYCODE_BUTTON_A] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_Z] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_Y] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_B] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_C] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_R1] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_L1] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_L2] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_R2] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[96] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[99] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[101] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[100] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[97] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[98] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[103] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[102] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + android->keycode_lut[104] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[105] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); break; case DEVICE_HOLTEK_JC_U912F: g_settings.input.device[port] = device; strlcpy(g_settings.input.device_names[port], "Elecom JC-U912F", sizeof(g_settings.input.device_names[port])); - android->keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_11] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_12] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[195] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[194] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + android->keycode_lut[193] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[192] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[188] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[189] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[190] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[191] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[196] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift); + android->keycode_lut[190] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift); + android->keycode_lut[198] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[199] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); break; case DEVICE_BROADCOM_BLUETOOTH_HID: RARCH_LOG("Bluetooth HID\n"); @@ -577,63 +577,63 @@ static void android_input_set_keybinds(void *data, unsigned device, /* Red Samurai */ strlcpy(g_settings.input.device_names[port], "Red Samurai", sizeof(g_settings.input.device_names[port])); - android->keycode_lut[AKEYCODE_W] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); - android->keycode_lut[AKEYCODE_S] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); - android->keycode_lut[AKEYCODE_A] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); - android->keycode_lut[AKEYCODE_D]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); - 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_BACK] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_ENTER] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - android->keycode_lut[AKEYCODE_9] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift); - android->keycode_lut[AKEYCODE_0] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift); - android->keycode_lut[AKEYCODE_5] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_6] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - android->keycode_lut[AKEYCODE_7] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_8] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[51] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[47] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[29] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[32]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[19] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[20] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[21] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[22]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[4] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[66] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[16] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift); + android->keycode_lut[7] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift); + android->keycode_lut[12] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[13] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + android->keycode_lut[14] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[15] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); /* unsure if the person meant the SNES-mapping here or whether it's the pad */ - android->keycode_lut[AKEYCODE_1] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_2] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_3] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_4] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[8] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[9] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[10] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[11] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); break; case ICADE_PROFILE_IPEGA_PG9017: strlcpy(g_settings.input.device_names[port], "iPega PG-9017", sizeof(g_settings.input.device_names[port])); /* This maps to SNES layout, not button labels on gamepad -- SNES layout has A to the right of B */ - android->keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); /* Button labeled X on gamepad */ - android->keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); /* Button labeled A on gamepad */ - android->keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); /* Button labeled B on gamepad */ - android->keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); /* Button labeled Y on gamepad */ - android->keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_10] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[188] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); /* Button labeled X on gamepad */ + android->keycode_lut[189] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); /* Button labeled A on gamepad */ + android->keycode_lut[190] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); /* Button labeled B on gamepad */ + android->keycode_lut[191] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); /* Button labeled Y on gamepad */ + android->keycode_lut[192] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[193] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[196] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[197] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); /* These don't work, in gamepad mode the dpad sends AXIS_HAT_X and AXIS_HAT_Y motion events instead of button events, so they get processed by engine_handle_dpad_getaxisvalue() */ - 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[19] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[20] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[21] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[22]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); break; case ICADE_PROFILE_IPEGA_PG9017_MODE2: strlcpy(g_settings.input.device_names[port], "iPega PG-9017 (Mode2)", sizeof(g_settings.input.device_names[port])); android->keycode_lut[AKEYCODE_M] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_J] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_K] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_I] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_Q] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[38] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[39] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[37] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[45] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); android->keycode_lut[AKEYCODE_P] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_R] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[46] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); android->keycode_lut[AKEYCODE_Y] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - 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[19] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[20] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[21] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[22]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); break; case ICADE_PROFILE_G910: strlcpy(g_settings.input.device_names[port], "G910", @@ -653,34 +653,34 @@ static void android_input_set_keybinds(void *data, unsigned device, android->keycode_lut[AKEYCODE_OTHR_108] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); /* These don't work, in gamepad mode the dpad sends AXIS_HAT_X and AXIS_HAT_Y motion events instead of button events, so they get processed by engine_handle_dpad_getaxisvalue() */ - 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[19] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[20] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[21] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[22]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); break; case ICADE_PROFILE_GAMESTOP_WIRELESS: strlcpy(g_settings.input.device_names[port], "Gamestop Wireless", sizeof(g_settings.input.device_names[port])); - android->keycode_lut[AKEYCODE_W] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); - android->keycode_lut[AKEYCODE_S] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); - android->keycode_lut[AKEYCODE_A] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); - android->keycode_lut[AKEYCODE_D] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); - 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_3] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_4] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_1] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_2] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_5] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_7] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_ESCAPE] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_ENTER] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - android->keycode_lut[AKEYCODE_6] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - android->keycode_lut[AKEYCODE_8] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); - android->keycode_lut[AKEYCODE_9] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift); - android->keycode_lut[AKEYCODE_0] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift); + android->keycode_lut[51] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[47] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[29] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[32] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[19] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[20] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[21] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[22] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[10] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[11] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[8] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[9] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[12] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[14] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[111] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[66] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[13] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + android->keycode_lut[15] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[16] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift); + android->keycode_lut[7] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift); break; case ICADE_PROFILE_MOGA_HERO_POWER: strlcpy(g_settings.input.device_names[port], "Moga Hero Power", @@ -691,10 +691,10 @@ static void android_input_set_keybinds(void *data, unsigned device, 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[4] |= ((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); + android->keycode_lut[106] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift); + android->keycode_lut[107] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift); } } break; @@ -704,16 +704,16 @@ static void android_input_set_keybinds(void *data, unsigned device, sizeof(g_settings.input.device_names[port])); /* TODO: L3/R3 */ - android->keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_10] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[189] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[190] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[191] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[188] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[194] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[195] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[192] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + android->keycode_lut[193] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[196] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[197] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); break; case DEVICE_DRAGONRISE: g_settings.input.device[port] = device; @@ -721,56 +721,56 @@ static void android_input_set_keybinds(void *data, unsigned device, sizeof(g_settings.input.device_names[port])); /* TODO: L3/R3 */ - android->keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[189] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[190] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[191] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[188] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[192] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[193] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[194] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[195] |= ((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])); - android->keycode_lut[AKEYCODE_BUTTON_R2]|= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_L2]|= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_A]|= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_B]|= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[105]|= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[104]|= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[96]|= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[97]|= ((RETRO_DEVICE_ID_JOYPAD_B+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])); - android->keycode_lut[AKEYCODE_BUTTON_R2]|= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_L2]|= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_A]|= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_X]|= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_B]|= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_C]|= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_Y]|= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_Z]|= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_L2]|= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_R1]|= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[105]|= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[104]|= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[96]|= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[99]|= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[97]|= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[98]|= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[100]|= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[101]|= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[104]|= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + android->keycode_lut[103]|= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); break; case DEVICE_DEFENDER_GAME_RACER_CLASSIC: g_settings.input.device[port] = device; strlcpy(g_settings.input.device_names[port], "Defender Game Racer Classic", sizeof(g_settings.input.device_names[port])); - android->keycode_lut[AKEYCODE_BUTTON_10]|= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_1]|= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_2]|= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_3]|= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_4]|= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_5]|= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_6]|= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_7]|= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_8]|= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_9]|= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[197]|= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[188]|= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[189]|= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[190]|= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[191]|= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[192]|= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[193]|= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + android->keycode_lut[194]|= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[195]|= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[196]|= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); break; case DEVICE_MOGA_IME: g_settings.input.device[port] = device; @@ -782,18 +782,18 @@ static void android_input_set_keybinds(void *data, unsigned device, * right stick left: 190 * right stick right: 191 */ - 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_START]|= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_SELECT]|= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_A]|= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_B]|= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_X]|= ((RETRO_DEVICE_ID_JOYPAD_Y+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); + android->keycode_lut[19] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[20] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[21] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[22]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[108]|= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[109]|= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[96]|= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[97]|= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[99]|= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[100]|= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[102]|= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[103]|= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); break; case DEVICE_CCPCREATIONS_WIIUSE_IME: g_settings.input.device[port] = device; @@ -802,104 +802,104 @@ static void android_input_set_keybinds(void *data, unsigned device, /* Player 1 */ - 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_1] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_2] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_3] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); - android->keycode_lut[AKEYCODE_4] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); - android->keycode_lut[AKEYCODE_5] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); - android->keycode_lut[AKEYCODE_6] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[19] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[20] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[21] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[22]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[8] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[9] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[10] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[11] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[12] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[13] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); android->keycode_lut[AKEYCODE_M] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); android->keycode_lut[AKEYCODE_P] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - android->keycode_lut[AKEYCODE_E] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_B] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_F] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_G] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_C] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_LEFT_BRACKET] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - android->keycode_lut[AKEYCODE_RIGHT_BRACKET] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); - android->keycode_lut[AKEYCODE_Z] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_H] |= ((RARCH_RESET+1) << shift); - android->keycode_lut[AKEYCODE_W] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); - android->keycode_lut[AKEYCODE_S] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); - android->keycode_lut[AKEYCODE_A] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); - android->keycode_lut[AKEYCODE_D] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); - android->keycode_lut[AKEYCODE_C] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_Z] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[33] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[30] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[34] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[35] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[31] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[71] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + android->keycode_lut[72] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[54] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[36] |= ((RARCH_RESET+1) << shift); + android->keycode_lut[51] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[47] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[29] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[32] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[31] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[54] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); /* Player 2 */ shift += 8; - android->keycode_lut[AKEYCODE_I] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); - android->keycode_lut[AKEYCODE_K] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); - android->keycode_lut[AKEYCODE_J] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[37] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[39] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[38] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); android->keycode_lut[AKEYCODE_O]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); - android->keycode_lut[AKEYCODE_COMMA] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_PERIOD] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_VOLUME_UP] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); - android->keycode_lut[AKEYCODE_VOLUME_DOWN] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); - android->keycode_lut[AKEYCODE_MEDIA_PREVIOUS] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); - android->keycode_lut[AKEYCODE_MEDIA_NEXT] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); - android->keycode_lut[AKEYCODE_MEDIA_PLAY] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_MEDIA_STOP] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_ENDCALL] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_CALL] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_PLUS] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - android->keycode_lut[AKEYCODE_MINUS] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_BACKSLASH] |= ((RARCH_RESET+1) << shift); - android->keycode_lut[AKEYCODE_L] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_R] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_SEARCH] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - android->keycode_lut[AKEYCODE_TAB] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[55] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[56] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[24] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[25] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[88] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[87] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[126] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[86] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[6] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[5] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[81] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[69] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[73] |= ((RARCH_RESET+1) << shift); + android->keycode_lut[40] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[46] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[84] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + android->keycode_lut[61] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); /* Player 3 */ shift += 8; - android->keycode_lut[AKEYCODE_PAGE_UP] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); - android->keycode_lut[AKEYCODE_PAGE_DOWN] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); - android->keycode_lut[AKEYCODE_MEDIA_REWIND] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); - android->keycode_lut[AKEYCODE_MEDIA_FAST_FORWARD]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); - android->keycode_lut[AKEYCODE_SOFT_LEFT]|= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_SOFT_RIGHT]|= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_THUMBR]|= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_THUMBL]|= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_SPACE]|= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); - android->keycode_lut[AKEYCODE_SYM]|= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); - android->keycode_lut[AKEYCODE_EXPLORER]|= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); - android->keycode_lut[AKEYCODE_ENVELOPE]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_X]|= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_Y]|= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_A]|= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_B]|= ((RETRO_DEVICE_ID_JOYPAD_B+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); - android->keycode_lut[AKEYCODE_BUTTON_L2]|= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_R2]|= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[92] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[93] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[89] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[90]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[1]|= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[2]|= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[107]|= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[106]|= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[62]|= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[63]|= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[64]|= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[65]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[99]|= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[100]|= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[96]|= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[97]|= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[102]|= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[103]|= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[104]|= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + android->keycode_lut[105]|= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); /* Player 4 */ shift += 8; android->keycode_lut[AKEYCODE_N] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); - android->keycode_lut[AKEYCODE_Q] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); - android->keycode_lut[AKEYCODE_T] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); - android->keycode_lut[AKEYCODE_APOSTROPHE]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); - android->keycode_lut[AKEYCODE_NOTIFICATION]|= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_MUTE]|= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_START]|= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_SELECT]|= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - android->keycode_lut[AKEYCODE_CLEAR]|= ((RARCH_RESET+1) << shift); - android->keycode_lut[AKEYCODE_CAPS_LOCK] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); - android->keycode_lut[AKEYCODE_SCROLL_LOCK] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); - //android->keycode_lut[AKEYCODE_T] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); -- Left meta - //android->keycode_lut[AKEYCODE_APOSTROPHE]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); -- right meta - android->keycode_lut[AKEYCODE_META_FUNCTION_ON] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); - android->keycode_lut[AKEYCODE_SYSRQ] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - android->keycode_lut[AKEYCODE_BREAK] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - android->keycode_lut[AKEYCODE_MOVE_HOME] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_C] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - android->keycode_lut[AKEYCODE_BUTTON_Z] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - android->keycode_lut[AKEYCODE_GRAVE] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - android->keycode_lut[AKEYCODE_MEDIA_PAUSE] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + android->keycode_lut[45] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + android->keycode_lut[48] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + android->keycode_lut[75]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + android->keycode_lut[83]|= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[91]|= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[108]|= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + android->keycode_lut[109]|= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + android->keycode_lut[28]|= ((RARCH_RESET+1) << shift); + android->keycode_lut[115] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + android->keycode_lut[116] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + //android->keycode_lut[48] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); -- Left meta + //android->keycode_lut[75]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); -- right meta + android->keycode_lut[8] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + android->keycode_lut[120] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + android->keycode_lut[121] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + android->keycode_lut[122] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + android->keycode_lut[98] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + android->keycode_lut[101] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + android->keycode_lut[68] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + android->keycode_lut[127] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); break; case DEVICE_NONE: default: @@ -916,6 +916,6 @@ static void android_input_set_keybinds(void *data, unsigned device, g_settings.input.binds[port][i].joyaxis = g_settings.input.binds[port][i].def_joyaxis; } - android->keycode_lut[AKEYCODE_MENU] |= ((RARCH_MENU_TOGGLE + 1) << shift); + android->keycode_lut[82] |= ((RARCH_MENU_TOGGLE + 1) << shift); } }