mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 22:47:03 +00:00
input: use buffers during button translation
This should reduce some random noise by assgning the values once instead of twice
This commit is contained in:
parent
a33b2afe08
commit
977d729ee0
2 changed files with 8 additions and 4 deletions
|
|
@ -782,8 +782,10 @@ void evdev_joystick_handler::get_mapping(const std::shared_ptr<PadDevice>& devic
|
|||
}
|
||||
}
|
||||
|
||||
button.m_value = static_cast<u16>(value);
|
||||
TranslateButtonPress(m_dev, button_code, button.m_pressed, button.m_value);
|
||||
Button tmp = button; // Using a buffer because the values can change during translation
|
||||
tmp.m_value = static_cast<u16>(value);
|
||||
TranslateButtonPress(m_dev, button_code, tmp.m_pressed, tmp.m_value);
|
||||
button = tmp;
|
||||
}
|
||||
|
||||
// Translate any corresponding keycodes to our two sticks. (ignoring thresholds for now)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue