summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstanley lieber <stanley.lieber@gmail.com>2011-11-30 22:12:04 -0600
committerstanley lieber <stanley.lieber@gmail.com>2011-11-30 22:12:04 -0600
commitb8136286b6044b81945983a4651fcf9fb70ddad0 (patch)
tree3563c49c680e320751f60c509eb4180403945aa3
parentfe62caef5f4903426b727898472790c0a4dd694f (diff)
downloadplan9front-b8136286b6044b81945983a4651fcf9fb70ddad0.tar.xz
kb.c: add curly braces to enable usb mouse nub scrolling
-rw-r--r--sys/src/cmd/nusb/kb/kb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/src/cmd/nusb/kb/kb.c b/sys/src/cmd/nusb/kb/kb.c
index 47bf69215..7fdc97b6a 100644
--- a/sys/src/cmd/nusb/kb/kb.c
+++ b/sys/src/cmd/nusb/kb/kb.c
@@ -264,10 +264,12 @@ ptrwork(void* a)
y = buf[2];
}
b = maptab[buf[0] & 0x7];
- if(c > 3 && buf[3] == 1) /* up */
+ if(c > 3 && buf[3] > 0){ /* up */
b |= 0x08;
- if(c > 3 && buf[3] == -1) /* down */
+ }
+ if(c > 3 && buf[3] < 0){ /* down */
b |= 0x10;
+ }
if(kbdebug > 1)
fprint(2, "%s: m%11d %11d %11d\n", argv0, x, y, b);
seprint(mbuf, mbuf+sizeof(mbuf), "m%11d %11d %11d", x, y,b);