From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, linux-m68k@lists.linux-m68k.org,
linux-kernel@vger.kernel.org,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH 3/3] input/atari: Fix mouse movement and button mapping
Date: Sun, 8 May 2011 11:17:27 +0200 [thread overview]
Message-ID: <1304846247-12401-4-git-send-email-geert@linux-m68k.org> (raw)
In-Reply-To: <1304846247-12401-1-git-send-email-geert@linux-m68k.org>
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 | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/input/mouse/atarimouse.c b/drivers/input/mouse/atarimouse.c
index 16a9d0f..5c4a692 100644
--- a/drivers/input/mouse/atarimouse.c
+++ b/drivers/input/mouse/atarimouse.c
@@ -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);
--
1.7.0.4
next prev parent reply other threads:[~2011-05-08 9:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-08 9:17 [PATCH 0/3] Atari input patches Geert Uytterhoeven
2011-05-08 9:17 ` [PATCH 1/3] input/atari: Use the correct mouse interrupt hook Geert Uytterhoeven
2011-05-08 9:17 ` [PATCH 2/3] input/atari: Fix atarimouse init Geert Uytterhoeven
2011-05-08 9:17 ` Geert Uytterhoeven [this message]
2011-05-09 6:00 ` [PATCH 0/3] Atari input patches Dmitry Torokhov
2011-05-09 7:10 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1304846247-12401-4-git-send-email-geert@linux-m68k.org \
--to=geert@linux-m68k.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).