mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 22:47:03 +00:00
Input: fix evdev buttons
This commit is contained in:
parent
595ad15499
commit
ac3982d2b0
2 changed files with 8 additions and 5 deletions
|
|
@ -552,8 +552,11 @@ int evdev_joystick_handler::GetButtonInfo(const input_event& evt, const EvdevDev
|
|||
m_is_button_or_trigger = true;
|
||||
|
||||
// get the button value and return its code
|
||||
if (code < BTN_MISC)
|
||||
if (button_list.find(code) == button_list.end())
|
||||
{
|
||||
LOG_ERROR(GENERAL, "Evdev button %s (%d) is unknown. Please add it to the button list.", libevdev_event_code_get_name(EV_KEY, code), code);
|
||||
return -1;
|
||||
}
|
||||
|
||||
value = val > 0 ? 255 : 0;
|
||||
return code;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue