mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-11 16:49:28 +02: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:
@ -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;
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user