diff options
| author | nyx <nnyyxxxx@protonmail.com> | 2025-03-06 11:33:01 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-06 17:33:01 +0100 |
| commit | 4435f5c5463978ea689e6b4aa30e455e061a80ad (patch) | |
| tree | db6297b675d5c148f52e898980108ffdacf1b609 /src/managers/input/InputManager.cpp | |
| parent | 7a84317f33e325155a6d7157db815b27fb26b75f (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.cpp | 18 |
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; + } } } |
