input/atari: Fix mouse movement and button mapping
authorGeert Uytterhoeven <geert@linux-m68k.org>
Mon, 31 Jan 2011 19:15:04 +0000 (20:15 +0100)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Thu, 19 May 2011 16:19:12 +0000 (18:19 +0200)
Up and down movements were reversed, left and right buttons were swapped.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
drivers/input/mouse/atarimouse.c

index 16a9d0ffab8afcd3a738db152f6a9ebb4485b40a..5c4a692bf73aee120aaf928fb2d33104f51dea65 100644 (file)
@@ -77,15 +77,15 @@ static void atamouse_interrupt(char *buf)
 #endif
 
        /* only relative events get here */
-       dx =  buf[1];
-       dy = -buf[2];
+       dx = buf[1];
+       dy = buf[2];
 
        input_report_rel(atamouse_dev, REL_X, dx);
        input_report_rel(atamouse_dev, REL_Y, dy);
 
-       input_report_key(atamouse_dev, BTN_LEFT,   buttons & 0x1);
+       input_report_key(atamouse_dev, BTN_LEFT,   buttons & 0x4);
        input_report_key(atamouse_dev, BTN_MIDDLE, buttons & 0x2);
-       input_report_key(atamouse_dev, BTN_RIGHT,  buttons & 0x4);
+       input_report_key(atamouse_dev, BTN_RIGHT,  buttons & 0x1);
 
        input_sync(atamouse_dev);