summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authornyx <nnyyxxxx@protonmail.com>2025-03-06 11:33:01 -0500
committerGitHub <noreply@github.com>2025-03-06 17:33:01 +0100
commit4435f5c5463978ea689e6b4aa30e455e061a80ad (patch)
treedb6297b675d5c148f52e898980108ffdacf1b609 /src/managers/input/InputManager.cpp
parent7a84317f33e325155a6d7157db815b27fb26b75f (diff)
input: fixup mouse check for flipping x / y (#9529)
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp18
1 files changed, 10 insertions, 8 deletions
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;
+ }
}
}