diff --git a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp index cf726698f1..9c7a08428e 100644 --- a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp +++ b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp @@ -175,9 +175,13 @@ void ControllerInterface::RemoveDevice(std::function lk(m_devices_mutex); - for (const auto& d : m_devices) - d->UpdateInput(); + // Don't block the UI or CPU thread (to avoid a short but noticeable frame drop) + if (m_devices_mutex.try_lock()) + { + std::lock_guard lk(m_devices_mutex, std::adopt_lock); + for (const auto& d : m_devices) + d->UpdateInput(); + } } //