Signed-off-by: Xiangfu Liu <[email protected]>
---
softusb-input/main.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/softusb-input/main.c b/softusb-input/main.c
index 3973927..29d861b 100644
--- a/softusb-input/main.c
+++ b/softusb-input/main.c
@@ -475,11 +475,9 @@ static char process_mouse(struct ep_status *ep, unsigned
char *buf,
* a report ID and 16 bit coordinates. We're too lazy to parse
* report descriptors, so we just hard-code that report layout.
*/
- if(len == 7) {
- buf[0] = buf[1]; /* buttons */
- buf[1] = buf[2]; /* X LSB */
- buf[2] = buf[4]; /* Y LSB */
- }
+ if(len == 6)
+ buf[2] = buf[3]; /* Y LSB */
+
if(len > 4)
len = 4;
m = COMLOC_MEVT_PRODUCE;
--
1.7.5.4
_______________________________________________
http://lists.milkymist.org/listinfo.cgi/devel-milkymist.org
IRC: #milkymist@Freenode