From 4435f5c5463978ea689e6b4aa30e455e061a80ad Mon Sep 17 00:00:00 2001 From: nyx Date: Thu, 6 Mar 2025 11:33:01 -0500 Subject: input: fixup mouse check for flipping x / y (#9529) --- src/managers/input/InputManager.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/managers/input/InputManager.cpp') diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index ba0b2df4..eb72c7b4 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -93,14 +93,16 @@ void CInputManager::onMouseMoved(IPointer::SMotionEvent e) { Vector2D delta = e.delta; Vector2D unaccel = e.unaccel; - if (!e.mouse && e.device) { - if (e.device->flipX) { - delta.x = -delta.x; - unaccel.x = -unaccel.x; - } - if (e.device->flipY) { - delta.y = -delta.y; - unaccel.y = -unaccel.y; + if (e.device) { + if (e.device->isTouchpad) { + if (e.device->flipX) { + delta.x = -delta.x; + unaccel.x = -unaccel.x; + } + if (e.device->flipY) { + delta.y = -delta.y; + unaccel.y = -unaccel.y; + } } } -- cgit v1.2.3