From 211c23e004d316b1e917f3601b975bd3ba404786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 11 Nov 2023 14:27:15 +0100 Subject: [PATCH] Remove the axis event filtering from Screen.cpp again. See #18368 --- Common/UI/Screen.cpp | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/Common/UI/Screen.cpp b/Common/UI/Screen.cpp index 1707b1a56679..e263ebfc59ce 100644 --- a/Common/UI/Screen.cpp +++ b/Common/UI/Screen.cpp @@ -119,27 +119,8 @@ bool ScreenManager::key(const KeyInput &key) { void ScreenManager::axis(const AxisInput *axes, size_t count) { std::lock_guard guard(inputLock_); - - for (size_t i = 0; i < count; i++) { - const AxisInput &axis = axes[i]; - // Ignore duplicate values to prevent axis values overwriting each other. - uint64_t key = ((uint64_t)axis.axisId << 32) | axis.deviceId; - // Center value far from zero just to ensure we send the first zero. - // PSP games can't see higher resolution than this. - int value = 128 + ceilf(axis.value * 127.5f + 127.5f); - if (lastAxis_[key] == value) { - return; - } - lastAxis_[key] = value; - - // Send center axis to every screen layer. - if (axis.value == 0) { - for (auto &layer : stack_) { - layer.screen->UnsyncAxis(&axis, 1); - } - } else if (!stack_.empty()) { - stack_.back().screen->UnsyncAxis(&axis, 1); - } + if (!stack_.empty()) { + stack_.back().screen->UnsyncAxis(axes, count); } }