summaryrefslogtreecommitdiff
path: root/sys/dev/usb/uts.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2007-08-30 18:49:30 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2007-08-30 18:49:30 +0000
commitfc2c927f632a3b4f6ca3bd62ee92e494c68fb204 (patch)
treec274a8aedfb220922904ff6202d8010d87cfb248 /sys/dev/usb/uts.c
parent10bb4e9809e6636aa3a4266cc6c6565e67fb8679 (diff)
don't swap X and Y coordinates while in raw mode. ok robert@
Diffstat (limited to 'sys/dev/usb/uts.c')
-rw-r--r--sys/dev/usb/uts.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/usb/uts.c b/sys/dev/usb/uts.c
index 028279d84f8..9a99724d136 100644
--- a/sys/dev/usb/uts.c
+++ b/sys/dev/usb/uts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uts.c,v 1.17 2007/06/14 10:11:16 mbalmer Exp $ */
+/* $OpenBSD: uts.c,v 1.18 2007/08/30 18:49:29 matthieu Exp $ */
/*
* Copyright (c) 2007 Robert Nagy <robert@openbsd.org>
@@ -428,14 +428,15 @@ uts_get_pos(usbd_private_handle addr, struct uts_pos tp)
/* x/y values are not reliable if there is no pressure */
if (down) {
- if (sc->sc_tsscale.swapxy) { /* Swap X/Y-Axis */
+
+ if (sc->sc_tsscale.swapxy && !sc->sc_rawmode) {
+ /* Swap X/Y-Axis */
tp.y = x;
tp.x = y;
} else {
tp.x = x;
tp.y = y;
}
-
if (!sc->sc_rawmode) {
/* Scale down to the screen resolution. */
tp.x = ((tp.x - sc->sc_tsscale.minx) *