diff options
-rw-r--r-- | src/evdev.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/evdev.c b/src/evdev.c index 05c6cec..a62ebe7 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -490,12 +490,6 @@ EvdevReadInput(InputInfoPtr pInfo) int v[MAX_VALUATORS]; memcpy(v, pEvdev->vals, sizeof(int) * pEvdev->num_vals); - if (pEvdev->swap_axes) { - int tmp = v[0]; - v[0] = v[1]; - v[1] = tmp; - } - if (pEvdev->flags & EVDEV_CALIBRATED) { v[0] = xf86ScaleAxis(v[0], @@ -508,6 +502,12 @@ EvdevReadInput(InputInfoPtr pInfo) pEvdev->calibration.max_y, pEvdev->calibration.min_y); } + if (pEvdev->swap_axes) { + int tmp = v[0]; + v[0] = v[1]; + v[1] = tmp; + } + if (pEvdev->invert_x) v[0] = (pEvdev->absinfo[ABS_X].maximum - v[0] + pEvdev->absinfo[ABS_X].minimum); |