InputConfig: Update IsControllerControlledByGamepadDevice for Android input overhaul

This only matters for analytics, but still.
This commit is contained in:
JosJuice 2023-08-01 19:33:52 +02:00
parent a912a2c3f5
commit 02b0e287cb
1 changed files with 5 additions and 2 deletions

View File

@ -203,11 +203,14 @@ bool InputConfig::IsControllerControlledByGamepadDevice(int index) const
const auto& controller = m_controllers.at(index).get()->GetDefaultDevice(); const auto& controller = m_controllers.at(index).get()->GetDefaultDevice();
// By default on Android, no device is selected
if (controller.source == "")
return false;
// Filter out anything which obviously not a gamepad // Filter out anything which obviously not a gamepad
return !((controller.source == "Quartz") // OSX Quartz Keyboard/Mouse return !((controller.source == "Quartz") // OSX Quartz Keyboard/Mouse
|| (controller.source == "XInput2") // Linux and BSD Keyboard/Mouse || (controller.source == "XInput2") // Linux and BSD Keyboard/Mouse
|| (controller.source == "Android" && || (controller.source == "Android" && controller.cid <= 0) // Android non-gamepad device
controller.name == "Touchscreen") // Android Touchscreen
|| (controller.source == "DInput" && || (controller.source == "DInput" &&
controller.name == "Keyboard Mouse")); // Windows Keyboard/Mouse controller.name == "Keyboard Mouse")); // Windows Keyboard/Mouse
} }