Input: Add simple stick multipliers

This commit is contained in:
Megamouse 2019-05-16 21:14:33 +02:00
parent 34964e0e4f
commit 3a5d1c6b15
6 changed files with 23 additions and 19 deletions

View file

@ -525,12 +525,12 @@ void evdev_joystick_handler::TranslateButtonPress(u64 keyCode, bool& pressed, u1
else if (checkButtons(m_dev.axis_left))
{
pressed = value > (ignore_threshold ? 0 : profile->lstickdeadzone);
value = pressed ? NormalizeStickInput(value, profile->lstickdeadzone, ignore_threshold) : 0;
value = pressed ? NormalizeStickInput(value, profile->lstickdeadzone, profile->lstickmultiplier, ignore_threshold) : 0;
}
else if (checkButtons(m_dev.axis_right))
{
pressed = value > (ignore_threshold ? 0 : profile->rstickdeadzone);
value = pressed ? NormalizeStickInput(value, profile->rstickdeadzone, ignore_threshold) : 0;
value = pressed ? NormalizeStickInput(value, profile->rstickdeadzone, profile->rstickmultiplier, ignore_threshold) : 0;
}
else // normal button (should in theory also support sensitive buttons)
{