diff options
author | Garrett Brown <themagnificentmrb@gmail.com> | 2024-02-14 12:18:00 -0800 |
---|---|---|
committer | Garrett Brown <themagnificentmrb@gmail.com> | 2024-02-14 16:45:54 -0800 |
commit | e9093841a598677c85d2ec3abbf59d17331c1cef (patch) | |
tree | 04838e55f45e9591842ed7be2a5fb251fbad6c42 | |
parent | 353ba98d7ce30a38a6ad06f29ef2253d3aee9256 (diff) |
Revert "[Android][Peripherals] Fix input for controllers with only mouse source"
This reverts commit d6e9f4144c5e4b0abe25bccceddf9acbb8134926.
-rw-r--r-- | xbmc/platform/android/peripherals/PeripheralBusAndroid.cpp | 55 |
1 files changed, 2 insertions, 53 deletions
diff --git a/xbmc/platform/android/peripherals/PeripheralBusAndroid.cpp b/xbmc/platform/android/peripherals/PeripheralBusAndroid.cpp index eed225d755..6564c968f1 100644 --- a/xbmc/platform/android/peripherals/PeripheralBusAndroid.cpp +++ b/xbmc/platform/android/peripherals/PeripheralBusAndroid.cpp @@ -382,59 +382,8 @@ bool CPeripheralBusAndroid::ConvertToPeripheralScanResult( if (!inputDevice.supportsSource(CJNIViewInputDevice::SOURCE_JOYSTICK) && !inputDevice.supportsSource(CJNIViewInputDevice::SOURCE_GAMEPAD)) { - // Observed an anomylous PS4 controller with only SOURCE_MOUSE - if (!inputDevice.supportsSource(CJNIViewInputDevice::SOURCE_MOUSE)) - { - CLog::Log(LOGDEBUG, "CPeripheralBusAndroid: ignoring non-joystick device"); - return false; - } - - // Make sure the anomylous controller has buttons - // clang-format off - std::vector<int> buttons{ - AKEYCODE_BUTTON_A, - AKEYCODE_BUTTON_B, - AKEYCODE_BUTTON_C, - AKEYCODE_BUTTON_X, - AKEYCODE_BUTTON_Y, - AKEYCODE_BUTTON_Z, - AKEYCODE_BUTTON_L1, - AKEYCODE_BUTTON_R1, - AKEYCODE_BUTTON_L2, - AKEYCODE_BUTTON_R2, - AKEYCODE_BUTTON_THUMBL, - AKEYCODE_BUTTON_THUMBR, - AKEYCODE_BUTTON_START, - AKEYCODE_BUTTON_SELECT, - AKEYCODE_BUTTON_MODE, - AKEYCODE_BUTTON_1, - AKEYCODE_BUTTON_2, - AKEYCODE_BUTTON_3, - AKEYCODE_BUTTON_4, - AKEYCODE_BUTTON_5, - AKEYCODE_BUTTON_6, - AKEYCODE_BUTTON_7, - AKEYCODE_BUTTON_8, - AKEYCODE_BUTTON_9, - AKEYCODE_BUTTON_10, - AKEYCODE_BUTTON_11, - AKEYCODE_BUTTON_12, - AKEYCODE_BUTTON_13, - AKEYCODE_BUTTON_14, - AKEYCODE_BUTTON_15, - AKEYCODE_BUTTON_16, - }; - // clang-format on - - auto result = inputDevice.hasKeys(buttons); - - if (std::find(result.begin(), result.end(), true) == result.end()) - { - CLog::Log(LOGDEBUG, "CPeripheralBusAndroid: ignoring non-joystick device with mouse source"); - return false; - } - - CLog::Log(LOGDEBUG, "CPeripheralBusAndroid: adding non-joystick device with mouse source"); + CLog::Log(LOGDEBUG, "CPeripheralBusAndroid: ignoring non-joystick device"); + return false; } peripheralScanResult.m_type = PERIPHERAL_JOYSTICK; |