From e7e9bb50b69a619a7910e0a57d36a3750cdf806c Mon Sep 17 00:00:00 2001 From: netchild Date: Mon, 6 Feb 2006 20:29:17 +0000 Subject: [PATCH] MFC rev 1.79 and 1.80: Allow to use more than 7 buttons (31 in case you don't want to look at the code) with USB mice. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Requested by: Seán C. Farley Approved by: re (kensmith) --- sys/dev/usb/ums.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c index 1955aebf375..b883757d6aa 100644 --- a/sys/dev/usb/ums.c +++ b/sys/dev/usb/ums.c @@ -117,7 +117,7 @@ struct ums_softc { #define UMS_SPUR_BUT_UP 0x02 /* spurious button up events */ #define UMS_T 0x04 /* aa direction available (tilt) */ int nbuttons; -#define MAX_BUTTONS 7 /* chosen because sc_buttons is u_char */ +#define MAX_BUTTONS 31 /* chosen because sc_buttons is int */ u_char qbuf[QUEUE_BUFSIZE]; /* must be divisable by 3&4 */ u_char dummy[100]; /* XXX just for safety and for now */ @@ -425,7 +425,7 @@ ums_intr(xfer, addr, status) struct ums_softc *sc = addr; u_char *ibuf; int dx, dy, dz, dt; - u_char buttons = 0; + int buttons = 0; int i; #define UMS_BUT(i) ((i) < 3 ? (((i) + 2) % 3) : (i)) -- 2.45.2