Browse Source

device: invert digitizer Y axis on Linux to match Windows

It may intuitively feel upside down, but the current behaviour actually matches base.mouseWatcherNode, so this is probably the most consistent thing to do.
rdb 6 years ago
parent
commit
72c5555dc0
1 changed files with 2 additions and 1 deletions
  1. 2 1
      panda/src/device/evdevInputDevice.cxx

+ 2 - 1
panda/src/device/evdevInputDevice.cxx

@@ -636,7 +636,8 @@ init_device() {
           // Also T.Flight Hotas X throttle is reversed and can go backwards.
           if (axis == Axis::yaw || axis == Axis::rudder || axis == Axis::left_y || axis == Axis::right_y ||
               (axis == Axis::throttle && (quirks & QB_reversed_throttle) != 0) ||
-              (_device_class == DeviceClass::spatial_mouse && (axis == Axis::y || axis == Axis::z || axis == Axis::roll))) {
+              (_device_class == DeviceClass::spatial_mouse && (axis == Axis::y || axis == Axis::z || axis == Axis::roll)) ||
+              (_device_class == DeviceClass::digitizer && axis == Axis::y)) {
             std::swap(absinfo.maximum, absinfo.minimum);
           }
           if (axis == Axis::throttle && (quirks & QB_centered_throttle) != 0) {