diff options
| author | Dentomologist <dentomologist@gmail.com> | 2026-05-06 13:40:16 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-06 13:40:16 -0700 |
| commit | cf20cdabd4e54f384f49c6453de74a46404aa090 (patch) | |
| tree | 2cc08f01bf3ddc6b841e97a76a7d874136c7c469 /Source | |
| parent | 6d5399246e2147217a8bf82892e22a5575f06293 (diff) | |
| parent | 20718de37e7a109db046a2f0663f90cf6b45f0e8 (diff) | |
Merge pull request #14632 from vladfi1/upstream-pipe-inputs-fix
Unconditionally lock in ControllerInterface::UpdateInput
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp | 10 |
1 files 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<bool(const ciface::Core::De InvokeDevicesChangedCallbacks(); } -// Update input for all devices if lock can be acquired without waiting. +// Update input for all devices. void ControllerInterface::UpdateInput() { // This should never happen @@ -337,13 +337,7 @@ void ControllerInterface::UpdateInput() std::vector<std::weak_ptr<ciface::Core::Device>> 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; |
