提交 659e6ed5 编写于 作者: G Geert Uytterhoeven

input/atari: Fix mouse movement and button mapping

Up and down movements were reversed, left and right buttons were swapped.
Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
上级 186f200a
...@@ -77,15 +77,15 @@ static void atamouse_interrupt(char *buf) ...@@ -77,15 +77,15 @@ static void atamouse_interrupt(char *buf)
#endif #endif
/* only relative events get here */ /* only relative events get here */
dx = buf[1]; dx = buf[1];
dy = -buf[2]; dy = buf[2];
input_report_rel(atamouse_dev, REL_X, dx); input_report_rel(atamouse_dev, REL_X, dx);
input_report_rel(atamouse_dev, REL_Y, dy); 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_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); input_sync(atamouse_dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册