aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2013-10-28 12:47:53 -0400
committerJiri Kosina <jkosina@suse.cz>2013-10-30 09:13:29 -0400
commit0abda6fa81dced031e3df31ac29bfb253549c2d1 (patch)
treef416e257da88315342b75a9ddc54df679ca8cb7e /drivers/hid
parent1c241131a126df9bfb930f27d2fe8887971af0c7 (diff)
HID: wiimote: fix inverted pro-controller axes
The analog-stick vertical axes are inverted. Fix that! Otherwise, games and other gamepad applications need to carry their own fixups (which they thankfully haven't done, yet). Cc: <stable@vger.kernel.org> # 3.11+ Reported-by: Rafael Brune <mail@rbrune.de> Tested-by: Rafael Brune <mail@rbrune.de> Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-wiimote-modules.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/hid-wiimote-modules.c b/drivers/hid/hid-wiimote-modules.c
index 71adf9e60b13..e30567af42ed 100644
--- a/drivers/hid/hid-wiimote-modules.c
+++ b/drivers/hid/hid-wiimote-modules.c
@@ -1656,9 +1656,9 @@ static void wiimod_pro_in_ext(struct wiimote_data *wdata, const __u8 *ext)
1656 ry = (ext[6] & 0xff) | ((ext[7] & 0x0f) << 8); 1656 ry = (ext[6] & 0xff) | ((ext[7] & 0x0f) << 8);
1657 1657
1658 input_report_abs(wdata->extension.input, ABS_X, lx - 0x800); 1658 input_report_abs(wdata->extension.input, ABS_X, lx - 0x800);
1659 input_report_abs(wdata->extension.input, ABS_Y, ly - 0x800); 1659 input_report_abs(wdata->extension.input, ABS_Y, 0x800 - ly);
1660 input_report_abs(wdata->extension.input, ABS_RX, rx - 0x800); 1660 input_report_abs(wdata->extension.input, ABS_RX, rx - 0x800);
1661 input_report_abs(wdata->extension.input, ABS_RY, ry - 0x800); 1661 input_report_abs(wdata->extension.input, ABS_RY, 0x800 - ry);
1662 1662
1663 input_report_key(wdata->extension.input, 1663 input_report_key(wdata->extension.input,
1664 wiimod_pro_map[WIIMOD_PRO_KEY_RIGHT], 1664 wiimod_pro_map[WIIMOD_PRO_KEY_RIGHT],