Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

David Herrmann and committed by
Jiri Kosina
0abda6fa 1c241131

+2 -2
+2 -2
drivers/hid/hid-wiimote-modules.c
··· 1656 1656 ry = (ext[6] & 0xff) | ((ext[7] & 0x0f) << 8); 1657 1657 1658 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 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 1663 input_report_key(wdata->extension.input, 1664 1664 wiimod_pro_map[WIIMOD_PRO_KEY_RIGHT],