diff options
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp index c139d3b787..b36387162d 100644 --- a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp +++ b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp @@ -104,6 +104,8 @@ void ControllerInterface::Shutdown() if (!m_is_init) return; + std::lock_guard<std::mutex> lk(m_devices_mutex); + for (ciface::Core::Device* d : m_devices) { // Set outputs to ZERO before destroying device @@ -141,6 +143,7 @@ void ControllerInterface::Shutdown() void ControllerInterface::AddDevice(ciface::Core::Device* device) { + std::lock_guard<std::mutex> lk(m_devices_mutex); m_devices.push_back(device); } @@ -151,6 +154,7 @@ void ControllerInterface::AddDevice(ciface::Core::Device* device) // void ControllerInterface::UpdateInput() { + std::lock_guard<std::mutex> lk(m_devices_mutex); for (ciface::Core::Device* d : m_devices) d->UpdateInput(); } |
