Fix camera pitch by mouse pitch

This commit is contained in:
luiscuenca 2019-11-22 14:51:37 -07:00
parent d76dfbe83b
commit 2f887228cf
No known key found for this signature in database
GPG key ID: 2387ECD129A6961D

View file

@ -146,7 +146,7 @@ bool KeyboardMouseDevice::isWheelByTouchPad(QWheelEvent* event) {
} else {
_wheelDeltaRepeatCount.setX(0);
}
return deltaValueX != COMMON_WHEEL_DELTA_VALUE && _wheelDeltaRepeatCount.x() < MAX_WHEEL_DELTA_REPEAT;
return deltaValueX < COMMON_WHEEL_DELTA_VALUE && _wheelDeltaRepeatCount.x() < MAX_WHEEL_DELTA_REPEAT;
}
if (deltaValueY != 0) {
if (abs(_lastWheelDelta.y()) == deltaValueY) {
@ -154,7 +154,7 @@ bool KeyboardMouseDevice::isWheelByTouchPad(QWheelEvent* event) {
} else {
_wheelDeltaRepeatCount.setY(0);
}
return deltaValueY != COMMON_WHEEL_DELTA_VALUE && _wheelDeltaRepeatCount.y() < MAX_WHEEL_DELTA_REPEAT;
return deltaValueY < COMMON_WHEEL_DELTA_VALUE && _wheelDeltaRepeatCount.y() < MAX_WHEEL_DELTA_REPEAT;
}
return false;
}