mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +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
|
|
@ -555,8 +555,10 @@ void PadHandlerBase::get_mapping(const std::shared_ptr<PadDevice>& device, const
|
|||
// Translate any corresponding keycodes to our normal DS3 buttons and triggers
|
||||
for (auto& btn : pad->m_buttons)
|
||||
{
|
||||
btn.m_value = button_values[btn.m_keyCode];
|
||||
TranslateButtonPress(device, btn.m_keyCode, btn.m_pressed, btn.m_value);
|
||||
Button tmp = btn; // Using a buffer because the values can change during translation
|
||||
tmp.m_value = button_values[btn.m_keyCode];
|
||||
TranslateButtonPress(device, tmp.m_keyCode, tmp.m_pressed, tmp.m_value);
|
||||
btn = tmp;
|
||||
}
|
||||
|
||||
// used to get the absolute value of an axis
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue