diff options
author | Garrett Brown <themagnificentmrb@gmail.com> | 2024-02-14 12:15:33 -0800 |
---|---|---|
committer | Garrett Brown <themagnificentmrb@gmail.com> | 2024-02-14 12:15:33 -0800 |
commit | 042b136f97c8562b4beb7fce038710b7d433b01f (patch) | |
tree | 60f28ff161503c0e6968bac4dcf0c7ba127af426 | |
parent | eddc4c18b70d7c897fdb39e7abe9d82b324b04c1 (diff) |
Revert "[Android][Peripherals] Fix input for controllers with only mouse source"
This reverts commit 55f207cc219e9cdac9420a837c05fa1ee97c1aed.
-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; |