mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 23:11:25 +12:00
Fix hid_pad_handler
This commit is contained in:
parent
1b7b59466d
commit
ec8cb1668c
2 changed files with 4 additions and 4 deletions
|
@ -126,7 +126,7 @@ void hid_pad_handler<Device>::enumerate_devices()
|
|||
{
|
||||
Timer timer;
|
||||
std::set<std::string> device_paths;
|
||||
std::map<std::string, std::wstring_view> serials;
|
||||
std::map<std::string, std::wstring> serials;
|
||||
|
||||
for (const auto& [vid, pid] : m_ids)
|
||||
{
|
||||
|
@ -140,7 +140,7 @@ void hid_pad_handler<Device>::enumerate_devices()
|
|||
continue;
|
||||
}
|
||||
device_paths.insert(dev_info->path);
|
||||
serials[dev_info->path] = dev_info->serial_number ? std::wstring_view(dev_info->serial_number) : std::wstring_view{};
|
||||
serials[dev_info->path] = dev_info->serial_number ? std::wstring(dev_info->serial_number) : std::wstring();
|
||||
dev_info = dev_info->next;
|
||||
}
|
||||
hid_free_enumeration(head);
|
||||
|
@ -149,7 +149,7 @@ void hid_pad_handler<Device>::enumerate_devices()
|
|||
|
||||
std::lock_guard lock(m_enumeration_mutex);
|
||||
m_new_enumerated_devices = device_paths;
|
||||
m_enumerated_serials = serials;
|
||||
m_enumerated_serials = std::move(serials);
|
||||
}
|
||||
|
||||
template <class Device>
|
||||
|
|
|
@ -78,7 +78,7 @@ protected:
|
|||
|
||||
std::set<std::string> m_last_enumerated_devices;
|
||||
std::set<std::string> m_new_enumerated_devices;
|
||||
std::map<std::string, std::wstring_view> m_enumerated_serials;
|
||||
std::map<std::string, std::wstring> m_enumerated_serials;
|
||||
std::mutex m_enumeration_mutex;
|
||||
std::unique_ptr<named_thread<std::function<void()>>> m_enumeration_thread;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue