提交 268ba5c0 编写于 作者: C Christoph Fritz 提交者: Dmitry Torokhov

Input: mousedev - fix regression of inverting axes

Introduced by 987a6c02 a swap in max/min
calculation gets fixed by this patch.
Reported-by: NBruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: NChristoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 8905aaaf
...@@ -138,8 +138,8 @@ static void mousedev_touchpad_event(struct input_dev *dev, ...@@ -138,8 +138,8 @@ static void mousedev_touchpad_event(struct input_dev *dev,
fx(0) = value; fx(0) = value;
if (mousedev->touch && mousedev->pkt_count >= 2) { if (mousedev->touch && mousedev->pkt_count >= 2) {
size = input_abs_get_min(dev, ABS_X) - size = input_abs_get_max(dev, ABS_X) -
input_abs_get_max(dev, ABS_X); input_abs_get_min(dev, ABS_X);
if (size == 0) if (size == 0)
size = 256 * 2; size = 256 * 2;
...@@ -155,8 +155,8 @@ static void mousedev_touchpad_event(struct input_dev *dev, ...@@ -155,8 +155,8 @@ static void mousedev_touchpad_event(struct input_dev *dev,
fy(0) = value; fy(0) = value;
if (mousedev->touch && mousedev->pkt_count >= 2) { if (mousedev->touch && mousedev->pkt_count >= 2) {
/* use X size for ABS_Y to keep the same scale */ /* use X size for ABS_Y to keep the same scale */
size = input_abs_get_min(dev, ABS_X) - size = input_abs_get_max(dev, ABS_X) -
input_abs_get_max(dev, ABS_X); input_abs_get_min(dev, ABS_X);
if (size == 0) if (size == 0)
size = 256 * 2; size = 256 * 2;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册