mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Merge pull request #12083 from JosJuice/android-controlled-by-gamepad
InputConfig: Update IsControllerControlledByGamepadDevice for Android input overhaul
This commit is contained in:
commit
9a51215af3
@ -203,11 +203,14 @@ bool InputConfig::IsControllerControlledByGamepadDevice(int index) const
|
||||
|
||||
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
|
||||
return !((controller.source == "Quartz") // OSX Quartz Keyboard/Mouse
|
||||
|| (controller.source == "XInput2") // Linux and BSD Keyboard/Mouse
|
||||
|| (controller.source == "Android" &&
|
||||
controller.name == "Touchscreen") // Android Touchscreen
|
||||
|| (controller.source == "Android" && controller.cid <= 0) // Android non-gamepad device
|
||||
|| (controller.source == "DInput" &&
|
||||
controller.name == "Keyboard Mouse")); // Windows Keyboard/Mouse
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user