summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorVojtech Pavlik <vojtech@twilight.ucw.cz>2002-07-25 20:08:56 +0200
committerVojtech Pavlik <vojtech@twilight.ucw.cz>2002-07-25 20:08:56 +0200
commit5731e6d7f4b76a10b7f5e2010e0722cd8554571d (patch)
tree48e5f70092af6336aebdac6691ed17ee7fb4601e /drivers
parent6acab58c45e40dc91c58ac7caaa5c86b0d040571 (diff)
Because the Linux Input core follows the USB HID standard where it
comes to directions of movement and rotation, a mouse wheel should be positive where it "rotates forward, away from the user". We had the opposite in psmouse.c. Fixed this.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/mouse/psmouse.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/input/mouse/psmouse.c b/drivers/input/mouse/psmouse.c
index d19c9ce6d4bf..21b0ae2468e3 100644
--- a/drivers/input/mouse/psmouse.c
+++ b/drivers/input/mouse/psmouse.c
@@ -102,7 +102,7 @@ static void psmouse_process_packet(struct psmouse *psmouse)
case 1: /* Mouse extra info */
input_report_rel(dev, packet[2] & 0x80 ? REL_HWHEEL : REL_WHEEL,
- (int) (packet[2] & 7) - (int) (packet[2] & 8));
+ (int) (packet[2] & 8) - (int) (packet[2] & 7));
input_report_key(dev, BTN_SIDE, (packet[2] >> 4) & 1);
input_report_key(dev, BTN_EXTRA, (packet[2] >> 5) & 1);
@@ -111,7 +111,7 @@ static void psmouse_process_packet(struct psmouse *psmouse)
case 3: /* TouchPad extra info */
input_report_rel(dev, packet[2] & 0x08 ? REL_HWHEEL : REL_WHEEL,
- (int) ((packet[2] >> 4) & 7) - (int) ((packet[2] >> 4) & 8));
+ (int) ((packet[2] >> 4) & 8) - (int) ((packet[2] >> 4) & 7));
packet[0] = packet[2] | 0x08;
break;
@@ -135,14 +135,14 @@ static void psmouse_process_packet(struct psmouse *psmouse)
*/
if (psmouse->type == PSMOUSE_IMPS || psmouse->type == PSMOUSE_GENPS)
- input_report_rel(dev, REL_WHEEL, (signed char) packet[3]);
+ input_report_rel(dev, REL_WHEEL, -(signed char) packet[3]);
/*
* Scroll wheel and buttons on IntelliMouse Explorer
*/
if (psmouse->type == PSMOUSE_IMEX) {
- input_report_rel(dev, REL_WHEEL, (int) (packet[3] & 7) - (int) (packet[3] & 8));
+ input_report_rel(dev, REL_WHEEL, (int) (packet[3] & 8) - (int) (packet[3] & 7));
input_report_key(dev, BTN_SIDE, (packet[3] >> 4) & 1);
input_report_key(dev, BTN_EXTRA, (packet[3] >> 5) & 1);
}