Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mac68k/dev Fix inverted Y-axis value passed to wsmo...



details:   https://anonhg.NetBSD.org/src/rev/04e21119871d
branches:  trunk
changeset: 934265:04e21119871d
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Tue Jun 09 11:44:48 2020 +0000

description:
Fix inverted Y-axis value passed to wsmouse_input(9).

Note this is what src/sys/arch/macppc/dev/ams.c does as
"upward (moving the mouse forward) is positive" as noted in wsmouse(9):
 http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/macppc/dev/ams.c#rev1.4

Reported and tested by @NonameInsect on his SE/30 and Xorg server.
Should be pulled up to netbsd-8 and netbsd-9.

diffstat:

 sys/arch/mac68k/dev/ams.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r c9510471b36c -r 04e21119871d sys/arch/mac68k/dev/ams.c
--- a/sys/arch/mac68k/dev/ams.c Tue Jun 09 06:18:01 2020 +0000
+++ b/sys/arch/mac68k/dev/ams.c Tue Jun 09 11:44:48 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ams.c,v 1.22 2013/10/19 16:23:17 martin Exp $  */
+/*     $NetBSD: ams.c,v 1.23 2020/06/09 11:44:48 tsutsui Exp $ */
 
 /*
  * Copyright (C) 1998  Colin Wood
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ams.c,v 1.22 2013/10/19 16:23:17 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ams.c,v 1.23 2020/06/09 11:44:48 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -506,7 +506,7 @@
                if (amsc->sc_wsmousedev != NULL) /* wsmouse is attached? */
                        wsmouse_input(amsc->sc_wsmousedev,
                            new_event.u.m.buttons,
-                           new_event.u.m.dx, new_event.u.m.dy, 0, 0,
+                           new_event.u.m.dx, -new_event.u.m.dy, 0, 0,
                            WSMOUSE_INPUT_DELTA);
 #else
                /* do nothing */ ;



Home | Main Index | Thread Index | Old Index