1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 04:02:42 +01:00

Properly recognize triggers and axes for evdev pads.

This commit is contained in:
Artur 2021-11-17 20:19:53 +01:00 committed by Megamouse
parent 22910c02a9
commit 9f35c3f52d

View File

@ -1046,22 +1046,22 @@ bool evdev_joystick_handler::check_buttons(const std::vector<EvdevButton>& b, co
bool evdev_joystick_handler::get_is_left_trigger(u64 keyCode)
{
return keyCode == check_button(m_dev->trigger_left, static_cast<u32>(keyCode));
return check_button(m_dev->trigger_left, static_cast<u32>(keyCode));
}
bool evdev_joystick_handler::get_is_right_trigger(u64 keyCode)
{
return keyCode == check_button(m_dev->trigger_right, static_cast<u32>(keyCode));
return check_button(m_dev->trigger_right, static_cast<u32>(keyCode));
}
bool evdev_joystick_handler::get_is_left_stick(u64 keyCode)
{
return keyCode == check_buttons(m_dev->axis_left, static_cast<u32>(keyCode));
return check_buttons(m_dev->axis_left, static_cast<u32>(keyCode));
}
bool evdev_joystick_handler::get_is_right_stick(u64 keyCode)
{
return keyCode == check_buttons(m_dev->axis_right, static_cast<u32>(keyCode));
return check_buttons(m_dev->axis_right, static_cast<u32>(keyCode));
}
#endif