mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 07:21:25 +12: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