mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-18 00:01:45 +00:00
ControllerInterface: Add synchronisation
Since we may have to add/access devices from different threads, this adds synchronisation to anything that touches m_devices.
This commit is contained in:
parent
fd29e5c4cc
commit
d3e2ae35ff
3 changed files with 7 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
@ -167,6 +168,7 @@ public:
|
|||
Device* FindDevice(const DeviceQualifier& devq) const;
|
||||
|
||||
protected:
|
||||
std::mutex m_devices_mutex;
|
||||
std::vector<Device*> m_devices;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue