summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControlReference
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2025-04-06 14:43:45 +0200
committerJosJuice <josjuice@gmail.com>2025-04-21 21:25:35 +0200
commit50a8ae9d905941ac586b2e75267fc904c402ae9e (patch)
tree516ef79a32c63871dde0adbd4a14b195cdf511ed /Source/Core/InputCommon/ControlReference
parent427e9c5ad2e284af054701553104f655bbc95361 (diff)
IOS: Keep copy of m_devices in USBHost
This gets rid of the ugly direct access to USBScanner::m_devices that was introduced by the previous commit. This also fixes a potential thread safety issue. USB_HIDv4::TriggerDeviceChangeReply loops through m_devices and calls GetDeviceEntry for each device. If USB_HIDv4::TriggerDeviceChangeReply is called after a new device is added to m_devices but before hooks are dispatched, GetDeviceEntry crashes, because the hook that's supposed to update m_device_ids hasn't run yet. With this commit, this issue can no longer happen, because USBHost::m_devices_mutex doesn't get unlocked in between updating m_devices and dispatching the hooks.
Diffstat (limited to 'Source/Core/InputCommon/ControlReference')
0 files changed, 0 insertions, 0 deletions