mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-16 03:38:38 +12:00
Make sure hid_enumerate isn't called simultaneously in different threads
This commit is contained in:
parent
99db73a34f
commit
abd059c379
1 changed files with 5 additions and 2 deletions
|
@ -199,7 +199,11 @@ void hid_pad_handler<Device>::enumerate_devices()
|
|||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
#endif
|
||||
|
||||
std::lock_guard lock(m_enumeration_mutex);
|
||||
|
||||
#ifndef ANDROID
|
||||
for (const auto& [vid, pid] : m_ids)
|
||||
{
|
||||
hid_device_info* dev_info = hid_enumerate(vid, pid);
|
||||
|
@ -230,7 +234,6 @@ void hid_pad_handler<Device>::enumerate_devices()
|
|||
#endif
|
||||
hid_log.notice("%s enumeration found %d devices (%f ms)", m_type, device_paths.size(), timer.GetElapsedTimeInMilliSec());
|
||||
|
||||
std::lock_guard lock(m_enumeration_mutex);
|
||||
m_new_enumerated_devices = device_paths;
|
||||
m_enumerated_serials = std::move(serials);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue