Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Reverse the sign on the wheel data. I got it wr...
details: https://anonhg.NetBSD.org/src/rev/b4a28663679e
branches: trunk
changeset: 479871:b4a28663679e
user: augustss <augustss%NetBSD.org@localhost>
date: Fri Dec 24 01:14:01 1999 +0000
description:
Reverse the sign on the wheel data. I got it wrong from the start.
diffstat:
sys/dev/usb/ums.c | 13 +++++++++----
sys/dev/usb/usb_quirks.c | 3 +--
2 files changed, 10 insertions(+), 6 deletions(-)
diffs (57 lines):
diff -r 7916c4f540d1 -r b4a28663679e sys/dev/usb/ums.c
--- a/sys/dev/usb/ums.c Fri Dec 24 00:15:50 1999 +0000
+++ b/sys/dev/usb/ums.c Fri Dec 24 01:14:01 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ums.c,v 1.36 1999/11/26 01:39:27 augustss Exp $ */
+/* $NetBSD: ums.c,v 1.37 1999/12/24 01:14:01 augustss Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -172,7 +172,7 @@
usbd_status err;
char devinfo[1024];
u_int32_t flags, quirks;
- int i;
+ int i, wheel;
struct hid_location loc_btn;
sc->sc_iface = iface;
@@ -237,14 +237,19 @@
}
/* Try to guess the Z activator: first check Z, then WHEEL. */
+ wheel = 0;
if (hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Z),
hid_input, &sc->sc_loc_z, &flags) ||
- hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL),
- hid_input, &sc->sc_loc_z, &flags)) {
+ (wheel = hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP,
+ HUG_WHEEL),
+ hid_input, &sc->sc_loc_z, &flags))) {
if ((flags & MOUSE_FLAGS_MASK) != MOUSE_FLAGS) {
sc->sc_loc_z.size = 0; /* Bad Z coord, ignore it */
} else {
sc->flags |= UMS_Z;
+ /* Wheels need the Z axis reversed. */
+ if (wheel)
+ sc->flags ^= UMS_REVZ;
}
}
diff -r 7916c4f540d1 -r b4a28663679e sys/dev/usb/usb_quirks.c
--- a/sys/dev/usb/usb_quirks.c Fri Dec 24 00:15:50 1999 +0000
+++ b/sys/dev/usb/usb_quirks.c Fri Dec 24 01:14:01 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usb_quirks.c,v 1.19 1999/11/18 23:32:31 augustss Exp $ */
+/* $NetBSD: usb_quirks.c,v 1.20 1999/12/24 01:14:02 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.13 1999/11/17 22:33:47 n_hibma Exp $ */
/*
@@ -63,7 +63,6 @@
{ USB_VENDOR_ADS, USB_PRODUCT_ADS_ENET, 0x002, { UQ_NO_STRINGS }},
{ USB_VENDOR_PERACOM, USB_PRODUCT_PERACOM_SERIAL1, 0x101, { UQ_NO_STRINGS }},
{ USB_VENDOR_DALLAS, USB_PRODUCT_DALLAS_J6502, 0x0a2, { UQ_BAD_ADC }},
- { USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_N48, 0x110, { UQ_MS_REVZ }},
{ USB_VENDOR_ALTEC, USB_PRODUCT_ALTEC_ASC495, 0x000, { UQ_BAD_AUDIO }},
{ USB_VENDOR_QTRONIX, USB_PRODUCT_QTRONIX_980N, 0x110, { UQ_SPUR_BUT_UP }},
{ 0, 0, 0, { 0 } }
Home |
Main Index |
Thread Index |
Old Index