mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 06:26:49 +00:00
HID: optimize get_next_button_press a bit
This commit is contained in:
parent
09875a5180
commit
bb03e17e2d
2 changed files with 12 additions and 13 deletions
|
|
@ -217,12 +217,9 @@ std::shared_ptr<Device> hid_pad_handler<Device>::get_hid_device(const std::strin
|
|||
return nullptr;
|
||||
|
||||
// Controllers 1-n in GUI
|
||||
for (auto& cur_control : m_controllers)
|
||||
if (auto it = m_controllers.find(padId); it != m_controllers.end())
|
||||
{
|
||||
if (padId == cur_control.first)
|
||||
{
|
||||
return cur_control.second;
|
||||
}
|
||||
return it->second;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue