From 455b7ea0c46f832a19ea8fb80c47217e14e62e38 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 17 Feb 2013 23:18:03 +0100 Subject: [PATCH] (Android) Restore PS3 controls --- android/native/jni/input_autodetect.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/android/native/jni/input_autodetect.c b/android/native/jni/input_autodetect.c index 0de8a34981..6591fc0744 100644 --- a/android/native/jni/input_autodetect.c +++ b/android/native/jni/input_autodetect.c @@ -414,6 +414,12 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned bool do_invert = (strstr(name_buf, "Gamepad 0") || strstr(name_buf, "Gamepad 1") || strstr(name_buf, "Gamepad 2") || strstr(name_buf, "Gamepad 3")); + g_settings.input.dpad_emulation[port] = DPAD_EMULATION_NONE; + keycode_lut[AKEYCODE_DPAD_UP] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + keycode_lut[AKEYCODE_DPAD_DOWN] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + keycode_lut[AKEYCODE_DPAD_LEFT] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + keycode_lut[AKEYCODE_DPAD_RIGHT] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + if (do_invert) { keycode_lut[AKEYCODE_BUTTON_A] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);