input: fixup mouse check for flipping x / y (#9529)

This commit is contained in:
nyx
2025-03-06 11:33:01 -05:00
committed by GitHub
parent 7a84317f33
commit 4435f5c546
3 changed files with 16 additions and 8 deletions

View File

@@ -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;
}
}
}