From 20718de37e7a109db046a2f0663f90cf6b45f0e8 Mon Sep 17 00:00:00 2001 From: Vlad Firoiu Date: Thu, 30 Apr 2026 18:26:38 -0400 Subject: [PATCH] Unconditionally lock in ControllerInterface::UpdateInput. --- .../ControllerInterface/ControllerInterface.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp index 9dd8cdb6a9..20fd517b2d 100644 --- a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp +++ b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp @@ -319,7 +319,7 @@ void ControllerInterface::RemoveDevice(std::function> devices_to_remove; { - // TODO: if we are an emulation input channel, we should probably always lock. - // Prefer outdated values over blocking UI or CPU thread (this avoids short but noticeable frame - // drops) - if (!m_devices_mutex.try_lock()) - return; - - std::lock_guard lk_devices(m_devices_mutex, std::adopt_lock); + std::lock_guard lk_devices(m_devices_mutex); tls_is_updating_devices = true;