diff --git a/android/native/jni/input_android.c b/android/native/jni/input_android.c index 66291fd81c..df11f8dd5f 100644 --- a/android/native/jni/input_android.c +++ b/android/native/jni/input_android.c @@ -428,10 +428,29 @@ static void android_input_set_keybinds(void *data, unsigned device, /* right analog stick - TODO */ /* menu button? */ break; + case DEVICE_ICONTROLPAD_HID_JOYSTICK: + g_settings.input.device[port] = device; + g_settings.input.dpad_emulation[port] = ANALOG_DPAD_NONE; + strlcpy(g_settings.input.device_names[port], "iControlPad HID Joystick profile", + sizeof(g_settings.input.device_names[port])); + + keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + keycode_lut[AKEYCODE_BUTTON_14] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + keycode_lut[AKEYCODE_BUTTON_13] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + keycode_lut[AKEYCODE_BUTTON_11] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + keycode_lut[AKEYCODE_BUTTON_12] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + keycode_lut[AKEYCODE_BUTTON_10] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + keycode_lut[AKEYCODE_BUTTON_15] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + break; case DEVICE_ICONTROLPAD_BLUEZ_IME: g_settings.input.device[port] = device; g_settings.input.dpad_emulation[port] = ANALOG_DPAD_NONE; - strlcpy(g_settings.input.device_names[port], "iControlpad Bluez IME", + strlcpy(g_settings.input.device_names[port], "iControlPad SPP profile (using Bluez IME)", sizeof(g_settings.input.device_names[port])); keycode_lut[AKEYCODE_DPAD_UP] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); diff --git a/android/native/jni/input_autodetect.c b/android/native/jni/input_autodetect.c index e886985a1f..079128a453 100644 --- a/android/native/jni/input_autodetect.c +++ b/android/native/jni/input_autodetect.c @@ -111,8 +111,8 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned device = DEVICE_LOGITECH_DUAL_ACTION; else if (strstr(name_buf, "Logitech") && strstr(name_buf, "Precision")) device = DEVICE_LOGITECH_PRECISION_GAMEPAD; - else if (strstr(name_buf, "shooter-keypad")) - device = DEVICE_ICONTROLPAD_BLUEZ_IME; + else if (strstr(name_buf, "iControlPad-")) // followed by a 4 (hex) char HW id + device = DEVICE_ICONTROLPAD_HID_JOYSTICK; else if (strstr(name_buf, "SEGA VIRTUA STICK High Grade")) device = DEVICE_SEGA_VIRTUA_STICK_HIGH_GRADE; else if (strstr(name_buf, "TTT THT Arcade console 2P USB Play")) @@ -232,6 +232,11 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned device = DEVICE_CCPCREATIONS_WIIUSE_IME; snprintf(name_buf, sizeof(name_buf), "ccpcreations WiiUse"); } + else if (strstr(current_ime, "com.hexad.bluezime")) + { + device = DEVICE_ICONTROLPAD_BLUEZ_IME; + snprintf(name_buf, sizeof(name_buf), "iControlpad SPP mode (using Bluez IME)"); + } if (source == AINPUT_SOURCE_KEYBOARD && device != DEVICE_XPERIA_PLAY) device = DEVICE_KEYBOARD_RETROPAD; diff --git a/android/phoenix/res/layout/faq_supported_pads.xml b/android/phoenix/res/layout/faq_supported_pads.xml index 758a340260..b2c813ab32 100644 --- a/android/phoenix/res/layout/faq_supported_pads.xml +++ b/android/phoenix/res/layout/faq_supported_pads.xml @@ -9,5 +9,5 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="40px" - android:text="The following pads have been added to the autodetection list:\n\n* Logitech/Logicool Rumblepad 2\n* Microsoft Sidewinder USB (ISSUE - diagonals not working).\n* Microsoft Xbox 360 Wired/Wireless (ISSUE - diagonals not working).\n* PS3 Sixaxis/DualShock 3 (using either USB or Dancingpixelstudios' IME app)\n* MOGA (using either 'root' gamepad mode or official IME app)\n* JXD S5110\n* Snakebyte idroid\n* Logitech Dual Action\n* Mayflash Super Joy Box 3 Pro\n*RetroUSB SNES RetroPort\n*RetroUSB NES RetroPad\n*Buffalo SNES Pad\n* Elecom PS1/PS2 to USB\n* Archos gamepad\n* Xbox 1 (Titanium X-Joy Converter) (ISSUE - diagonals not working).\n* Red Samurai (IME app Bluetooth or gamepad mode)\n* Xperia Play\n* Trust Raptor\n* Logitech F710\n* DragonRise USB\n* Madcatz PS3 fighting stick\n* iControlPad (needs to be tested)\n* iPega (gamepad mode, select it in iCade profile)\n* PC2JAMMA-USB (TODO - TEST)\n* Genius MaxFire G-08XU\n* Zeemote Steelseries\n* Saitek Rumblepad\n* Super Smart Joy\n* Groupwise PS2 to USB converter\n* Toodles 2008 Chimp\n* Sega Saturn USB pad\n*Mayflash Wii Classic\n* Mayflash PS2 to USB\n* Nintendo Wii (using ccpcreations.WiiUse IME app)\n* Nyko Playpad Pro" /> + android:text="The following pads have been added to the autodetection list:\n\n* Logitech/Logicool Rumblepad 2\n* Microsoft Sidewinder USB (ISSUE - diagonals not working).\n* Microsoft Xbox 360 Wired/Wireless (ISSUE - diagonals not working).\n* PS3 Sixaxis/DualShock 3 (using either USB or Dancingpixelstudios' IME app)\n* MOGA (using either 'root' gamepad mode or official IME app)\n* JXD S5110\n* Snakebyte idroid\n* Logitech Dual Action\n* Mayflash Super Joy Box 3 Pro\n* RetroUSB SNES RetroPort\n* RetroUSB NES RetroPad\n* Buffalo SNES Pad\n* Elecom PS1/PS2 to USB\n* Archos gamepad\n* Xbox 1 (Titanium X-Joy Converter) (ISSUE - diagonals not working).\n* Red Samurai (IME app Bluetooth or gamepad mode)\n* Xperia Play\n* Trust Raptor\n* Logitech F710\n* DragonRise USB\n* Madcatz PS3 fighting stick\n* iControlPad (HID joystick profile or SPP profile in tandem with Bluez IME)\n* iPega (gamepad mode, select it in iCade profile)\n* PC2JAMMA-USB (TODO - TEST)\n* Genius MaxFire G-08XU\n* Zeemote Steelseries\n* Saitek Rumblepad\n* Super Smart Joy\n* Groupwise PS2 to USB converter\n* Toodles 2008 Chimp\n* Sega Saturn USB pad\n* Mayflash Wii Classic\n* Mayflash PS2 to USB\n* Nintendo Wii (using ccpcreations.WiiUse IME app)\n* Nyko Playpad Pro" /> diff --git a/driver.h b/driver.h index f29ec720e2..975ea7f29f 100644 --- a/driver.h +++ b/driver.h @@ -220,6 +220,7 @@ enum input_devices DEVICE_LOGITECH_RUMBLEPAD2, DEVICE_LOGITECH_DUAL_ACTION, DEVICE_LOGITECH_PRECISION_GAMEPAD, + DEVICE_ICONTROLPAD_HID_JOYSTICK, DEVICE_ICONTROLPAD_BLUEZ_IME, DEVICE_TTT_THT_ARCADE, DEVICE_TOMMO_NEOGEOX_ARCADE,