Submit #2921 » 0001-Allow-moused-to-work-with-sysmouse-when-the-port-is-.patch
| usr.sbin/moused/moused.c | ||
|---|---|---|
|
if (rodent.level < 0)
|
||
|
rodent.level = 1;
|
||
|
ioctl(rodent.mfd, MOUSE_SETLEVEL, &rodent.level);
|
||
|
rodent.level = (ioctl(rodent.mfd, MOUSE_GETLEVEL, &level) == 0) ? level : 0;
|
||
|
rodent.level = (ioctl(rodent.mfd, MOUSE_GETLEVEL, &level) == 0) ? level : rodent.level;
|
||
|
/*
|
||
|
* Interrogate the driver and get some intelligence on the device...
|
||
| ... | ... | |
|
cur_proto[4] = rodent.mode.packetsize;
|
||
|
cur_proto[0] = rodent.mode.syncmask[0]; /* header byte bit mask */
|
||
|
cur_proto[1] = rodent.mode.syncmask[1]; /* header bit pattern */
|
||
|
} else if (rodent.rtype == MOUSE_PROTO_SYSMOUSE) {
|
||
|
bcopy(proto[rodent.rtype], cur_proto, sizeof(cur_proto));
|
||
|
if (rodent.level == 1) {
|
||
|
cur_proto[4] = 8;
|
||
|
}
|
||
|
}
|
||
|
/* maybe this is a PnP mouse... */
|
||