PERFORCE change 182688 for review

Hans Petter Selasky hselasky at FreeBSD.org
Sat Aug 21 16:19:15 UTC 2010


http://p4web.freebsd.org/@@182688?ac=10

Change 182688 by hselasky at 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)


More information about the p4-projects mailing list