mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
Android: Handle missing mappings for the Moga Pro 2 HID controller.
It seems to report the GENERIC_1 axis stuck at 1.
This commit is contained in:
parent
7c96e51bc8
commit
0067bf1b3e
@ -45,6 +45,14 @@ public class ControllerMappingHelper
|
|||||||
return 0.0f;
|
return 0.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (isMogaPro2Hid(inputDevice))
|
||||||
|
{
|
||||||
|
// This controller has a broken axis that reports a constant value. Ignore it.
|
||||||
|
if (axis == MotionEvent.AXIS_GENERIC_1)
|
||||||
|
{
|
||||||
|
return 0.0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,4 +67,10 @@ public class ControllerMappingHelper
|
|||||||
// Microsoft Xbox One controller
|
// Microsoft Xbox One controller
|
||||||
return inputDevice.getVendorId() == 0x45e && inputDevice.getProductId() == 0x2e0;
|
return inputDevice.getVendorId() == 0x45e && inputDevice.getProductId() == 0x2e0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isMogaPro2Hid(InputDevice inputDevice)
|
||||||
|
{
|
||||||
|
// Moga Pro 2 HID
|
||||||
|
return inputDevice.getVendorId() == 0x20d6 && inputDevice.getProductId() == 0x6271;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user