summaryrefslogtreecommitdiffstats
path: root/sys/dev/atkbdc
diff options
context:
space:
mode:
authoryokota <yokota@FreeBSD.org>1999-07-12 13:40:21 +0000
committeryokota <yokota@FreeBSD.org>1999-07-12 13:40:21 +0000
commitbca7b1975ca0625344edd921b0a15add987f6df8 (patch)
tree7815e27de157d8f66124de434c2727a7db6ed6ea /sys/dev/atkbdc
parent7b13a6e6f96131765e791435212c14bdf57497c8 (diff)
downloadFreeBSD-src-bca7b1975ca0625344edd921b0a15add987f6df8.zip
FreeBSD-src-bca7b1975ca0625344edd921b0a15add987f6df8.tar.gz
Implement a kludge for some wheeled mice for which infamous "psmintr:
out of sync..." messages is generated and the wheel movement is not recognized. The trick is found by Takashi Nishida.
Diffstat (limited to 'sys/dev/atkbdc')
-rw-r--r--sys/dev/atkbdc/psm.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c
index 9626023..de3b6ce 100644
--- a/sys/dev/atkbdc/psm.c
+++ b/sys/dev/atkbdc/psm.c
@@ -20,7 +20,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: psm.c,v 1.11 1999/06/03 12:40:53 yokota Exp $
+ * $Id: psm.c,v 1.12 1999/07/04 14:58:34 phk Exp $
*/
/*
@@ -992,14 +992,28 @@ psmprobe(device_t dev)
sc->mode.packetsize = vendortype[i].packetsize;
/* set mouse parameters */
+#if 0
+ /*
+ * A version of Logitech FirstMouse+ won't report wheel movement,
+ * if SET_DEFAULTS is sent... Don't use this command.
+ * This fix was found by Takashi Nishida.
+ */
i = send_aux_command(sc->kbdc, PSMC_SET_DEFAULTS);
if (verbose >= 2)
printf("psm%d: SET_DEFAULTS return code:%04x\n", unit, i);
+#endif
if (sc->config & PSM_CONFIG_RESOLUTION) {
sc->mode.resolution
= set_mouse_resolution(sc->kbdc,
- (sc->config & PSM_CONFIG_RESOLUTION) - 1);
+ (sc->config & PSM_CONFIG_RESOLUTION) - 1);
+ } else if (sc->mode.resolution >= 0) {
+ sc->mode.resolution
+ = set_mouse_resolution(sc->kbdc, sc->dflt_mode.resolution);
+ }
+ if (sc->mode.rate > 0) {
+ sc->mode.rate = set_mouse_sampling_rate(sc->kbdc, sc->dflt_mode.rate);
}
+ set_mouse_scaling(sc->kbdc, 1);
/* request a data packet and extract sync. bits */
if (get_mouse_status(sc->kbdc, stat, 1, 3) < 3) {
OpenPOWER on IntegriCloud