mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-30 08:02:22 +00:00
(Android) Input - Take out unused d_pad_emulation
This commit is contained in:
parent
afbe0b0666
commit
1342b22828
@ -71,7 +71,6 @@ typedef struct android_input
|
||||
uint64_t keycode_lut[LAST_KEYCODE];
|
||||
int16_t analog_state[MAX_PADS][MAX_AXIS];
|
||||
sensor_t accelerometer_state;
|
||||
unsigned dpad_emulation[MAX_PLAYERS];
|
||||
struct input_pointer pointer[MAX_TOUCH];
|
||||
unsigned pointer_count;
|
||||
ASensorManager* sensorManager;
|
||||
@ -80,7 +79,7 @@ typedef struct android_input
|
||||
|
||||
extern const rarch_joypad_driver_t android_joypad;
|
||||
|
||||
void (*engine_handle_dpad)(void *data, AInputEvent*, int, char*, size_t, int, bool, unsigned);
|
||||
void (*engine_handle_dpad)(void *data, AInputEvent*, int, char*, size_t, int, bool);
|
||||
static bool android_input_set_sensor_state(void *data, unsigned port, enum retro_sensor_action action, unsigned event_rate);
|
||||
|
||||
extern float AMotionEvent_getAxisValue(const AInputEvent* motion_event,
|
||||
@ -107,7 +106,7 @@ static inline void set_bit(uint8_t *buf, unsigned bit)
|
||||
|
||||
static void engine_handle_dpad_default(void *data, AInputEvent *event,
|
||||
int port, char *msg, size_t msg_sizeof,
|
||||
int source, bool debug_enable, unsigned emulation)
|
||||
int source, bool debug_enable)
|
||||
{
|
||||
size_t motion_pointer = AMotionEvent_getAction(event) >> AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT;
|
||||
android_input_t *android = (android_input_t*)data;
|
||||
@ -126,7 +125,7 @@ static void engine_handle_dpad_default(void *data, AInputEvent *event,
|
||||
|
||||
static void engine_handle_dpad_getaxisvalue(void *data, AInputEvent *event,
|
||||
int port, char *msg, size_t msg_sizeof, int source,
|
||||
bool debug_enable, unsigned emulation)
|
||||
bool debug_enable)
|
||||
{
|
||||
size_t motion_pointer = AMotionEvent_getAction(event) >> AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT;
|
||||
android_input_t *android = (android_input_t*)data;
|
||||
@ -225,8 +224,6 @@ static void *android_input_init(void)
|
||||
g_settings.input.binds[i][RETRO_DEVICE_ID_JOYPAD_R2].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_R2);
|
||||
g_settings.input.binds[i][RETRO_DEVICE_ID_JOYPAD_L3].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_L3);
|
||||
g_settings.input.binds[i][RETRO_DEVICE_ID_JOYPAD_R3].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_R3);
|
||||
|
||||
android->dpad_emulation[i] = ANALOG_DPAD_DUALANALOG;
|
||||
}
|
||||
*/
|
||||
|
||||
@ -303,7 +300,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "Logitech Rumblepad 2",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
android->keycode_lut[AKEYCODE_BUTTON_2] |= ((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);
|
||||
@ -322,7 +318,6 @@ 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->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -342,7 +337,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "Logitech Precision",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_NONE;
|
||||
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);
|
||||
@ -361,7 +355,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "GameMID",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -388,7 +381,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "iControlPad HID Joystick profile",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -407,7 +399,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "iControlPad SPP profile (using Bluez IME)",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -441,7 +432,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
/* same as Rumblepad 2 - merge? */
|
||||
//android->keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift);
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -476,7 +466,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "TOMMO Neogeo X Arcade",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_NONE;
|
||||
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);
|
||||
@ -493,7 +482,6 @@ 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->dpad_emulation[port] = ANALOG_DPAD_LSTICK;
|
||||
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);
|
||||
@ -513,7 +501,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
|
||||
// Rumblepad 2 DInput */
|
||||
/* TODO: Add L3/R3 */
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
|
||||
@ -533,7 +520,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "iDroid x360",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -565,7 +551,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "Zeemote Steelseries",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -580,7 +565,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "Huijia USB SNES",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_NONE;
|
||||
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_9] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
|
||||
@ -595,7 +579,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "Super Smartjoy",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_NONE;
|
||||
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_5] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
|
||||
@ -610,7 +593,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "Saitek Rumble P480",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -630,7 +612,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "MS Sidewinder Dual Strike",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_LSTICK;
|
||||
android->keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
|
||||
@ -646,7 +627,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "MS Sidewinder",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_LSTICK;
|
||||
android->keycode_lut[AKEYCODE_BUTTON_R2] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_L2] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_11] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift);
|
||||
@ -665,7 +645,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "Xbox",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
android->keycode_lut[AKEYCODE_BUTTON_MODE] |= ((RARCH_MENU_TOGGLE + 1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BACK] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_SELECT] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
|
||||
@ -684,7 +663,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "WiseGroup PlayStation2",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -707,7 +685,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "JCPS102 PlayStation2",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -730,7 +707,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "Generic PlayStation2",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -755,7 +731,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
|
||||
// Keyboard
|
||||
// TODO: Map L2/R2/L3/R3
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_NONE;
|
||||
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);
|
||||
@ -791,7 +766,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "PlayStation3",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -815,7 +789,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "Sega Virtua Stick",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_LSTICK;
|
||||
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);
|
||||
@ -834,7 +807,6 @@ 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->dpad_emulation[port] = ANALOG_DPAD_LSTICK;
|
||||
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);
|
||||
@ -852,7 +824,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "JXD S7300B",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -879,7 +850,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "JXD S7800B",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -903,7 +873,6 @@ 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->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -922,7 +891,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "Nyko Playpad Pro",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -945,7 +913,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
|
||||
/* TODO - Does D-pad work as D-pad? */
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
|
||||
@ -966,7 +933,6 @@ 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->dpad_emulation[port] = ANALOG_DPAD_NONE;
|
||||
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);
|
||||
@ -981,7 +947,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "USB 2 Axis 8 button",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -996,7 +961,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "Buffalo BGC FC801",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_NONE;
|
||||
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);
|
||||
@ -1011,7 +975,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "RetroUSB NES",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_NONE;
|
||||
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);
|
||||
@ -1022,7 +985,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "RetroUSB SNES",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_NONE;
|
||||
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);
|
||||
@ -1037,7 +999,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "Cypress USB",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG; // No idea
|
||||
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);
|
||||
@ -1050,11 +1011,9 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
break;
|
||||
case DEVICE_MAYFLASH_WII_CLASSIC:
|
||||
g_settings.input.device[port] = device;
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_NONE;
|
||||
strlcpy(g_settings.input.device_names[port], "Mayflash Wii Classic",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -1076,7 +1035,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "SZMy Power Dual Box Wii",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_LSTICK; // No idea
|
||||
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);
|
||||
@ -1098,7 +1056,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "Toodles 2008 Chimp",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_LSTICK;
|
||||
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);
|
||||
@ -1115,7 +1072,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "Archos Gamepad",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -1136,7 +1092,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "JXD S5110",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -1155,7 +1110,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "JXD S5110 Skelrom",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -1174,7 +1128,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "OUYA",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -1196,7 +1149,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "Elecom JC-U912F",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -1223,7 +1175,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
|
||||
g_extern.lifecycle_state |= (1ULL << MODE_INPUT_XPERIA_PLAY_HACK);
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_NONE;
|
||||
android->keycode_lut[AKEYCODE_DPAD_CENTER] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BACK] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift);
|
||||
@ -1259,7 +1210,6 @@ 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->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -1287,7 +1237,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
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->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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 */
|
||||
@ -1306,7 +1255,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
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->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -1324,7 +1272,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "G910",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
/* Face buttons map to SNES layout, not button labels on gamepad -- SNES layout has A to the right of B */
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
android->keycode_lut[AKEYCODE_NUMPAD_LCK_3] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); /* Button labeled X on gamepad */
|
||||
android->keycode_lut[AKEYCODE_NUMPAD_LCK_0] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); /* Button labeled A on gamepad */
|
||||
android->keycode_lut[AKEYCODE_NUMPAD_LCK_1] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); /* Button labeled B on gamepad */
|
||||
@ -1347,7 +1294,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
case ICADE_PROFILE_GAMESTOP_WIRELESS:
|
||||
strlcpy(g_settings.input.device_names[port], "Gamestop Wireless",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -1372,7 +1318,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
case ICADE_PROFILE_MOGA_HERO_POWER:
|
||||
strlcpy(g_settings.input.device_names[port], "Moga Hero Power",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
android->keycode_lut[AKEYCODE_NUMPAD_LCK_0] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_NUMPAD_LCK_1] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift);
|
||||
android->keycode_lut[AKEYCODE_NUMPAD_LCK_3] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift);
|
||||
@ -1392,7 +1337,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
/* TODO: L3/R3 */
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -1410,7 +1354,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
/* TODO: L3/R3 */
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -1426,8 +1369,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "Samsung Game Pad EI-GP20",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
|
||||
//B: "Pad 0: 96, ac=1, src = 1281"
|
||||
android->keycode_lut[AKEYCODE_BUTTON_B] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift);
|
||||
//A: "Pad 0: 97, ac=1, src = 1281"
|
||||
@ -1454,7 +1395,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "Tomee NES USB",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_NONE;
|
||||
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);
|
||||
@ -1465,7 +1405,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "Thrustmaster T Mini",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -1482,7 +1421,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "Defender Game Racer Classic",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_NONE;
|
||||
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);
|
||||
@ -1504,7 +1442,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
* right stick left: 190
|
||||
* right stick right: 191
|
||||
*/
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_LSTICK;
|
||||
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);
|
||||
@ -1522,7 +1459,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
g_settings.input.device[port] = device;
|
||||
strlcpy(g_settings.input.device_names[port], "NVIDIA Shield",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
g_settings.input.binds[port][RETRO_DEVICE_ID_JOYPAD_B].def_joykey = (AKEYCODE_BUTTON_A);
|
||||
g_settings.input.binds[port][RETRO_DEVICE_ID_JOYPAD_Y].def_joykey = (AKEYCODE_BUTTON_X);
|
||||
|
||||
@ -1579,7 +1515,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "MUCH iReadyGo i5",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -1600,7 +1535,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "Wikipad",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
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);
|
||||
@ -1623,7 +1557,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "FC30 Gamepad",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_NONE;
|
||||
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);
|
||||
@ -1643,7 +1576,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
strlcpy(g_settings.input.device_names[port], "ccpCreations WiiUse IME",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_NONE;
|
||||
|
||||
/* Player 1 */
|
||||
android->keycode_lut[AKEYCODE_DPAD_UP] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift);
|
||||
@ -1750,8 +1682,6 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
||||
g_settings.input.device[port] = 0;
|
||||
strlcpy(g_settings.input.device_names[port], "Unknown",
|
||||
sizeof(g_settings.input.device_names[port]));
|
||||
|
||||
android->dpad_emulation[port] = ANALOG_DPAD_DUALANALOG;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1771,8 +1701,7 @@ static int android_input_poll_event_type_motion(android_input_t *android, AInput
|
||||
{
|
||||
if (source & ~(AINPUT_SOURCE_TOUCHSCREEN | AINPUT_SOURCE_MOUSE))
|
||||
{
|
||||
//if (android->dpad_emulation[port] != ANALOG_DPAD_NONE)
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1912,8 +1841,7 @@ static void android_input_poll(void *data)
|
||||
float y = 0.0f;
|
||||
|
||||
if (android_input_poll_event_type_motion(android, event, &x, &y, port, source))
|
||||
engine_handle_dpad(android, event, port, msg, sizeof(msg), source, debug_enable,
|
||||
android->dpad_emulation[port]);
|
||||
engine_handle_dpad(android, event, port, msg, sizeof(msg), source, debug_enable);
|
||||
else
|
||||
{
|
||||
if (debug_enable)
|
||||
|
Loading…
x
Reference in New Issue
Block a user