Date: Sat, 21 Aug 2010 16:19:14 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 182688 for review Message-ID: <201008211619.o7LGJENv045593@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@182688?ac=10 Change 182688 by hselasky@hselasky_laptop001 on 2010/08/21 16:18:45 USB mouse: - add support for more mouse buttons - patch by: Lee, Chung-Yeol Reviewed by: hselasky @ Affected files ... .. //depot/projects/usb/src/sys/dev/usb/input/ums.c#31 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/input/ums.c#31 (text+ko) ==== @@ -399,6 +399,7 @@ struct ums_info *info = &sc->sc_info[index]; uint32_t flags; uint8_t i; + uint8_t j; if (hid_locate(buf, len, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X), hid_input, index, &info->sc_loc_x, &flags, &info->sc_iid_x)) { @@ -476,6 +477,17 @@ break; } } + + /* detect other buttons */ + + for (j = 0; (i < UMS_BUTTONS_MAX) && (j < 2); i++, j++) { + if (!hid_locate(buf, len, HID_USAGE2(HUP_MICROSOFT, (j + 1)), + hid_input, index, &info->sc_loc_btn[i], NULL, + &info->sc_iid_btn[i])) { + break; + } + } + info->sc_buttons = i; if (i > sc->sc_buttons)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008211619.o7LGJENv045593>