input: fixup mouse check for flipping x / y (#9529)
This commit is contained in:
parent
7a84317f33
commit
4435f5c546
3 changed files with 16 additions and 8 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue