Skip to content

Commit 0abda6f

Browse files
David HerrmannJiri Kosina
authored andcommitted
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: <[email protected]> # 3.11+ Reported-by: Rafael Brune <[email protected]> Tested-by: Rafael Brune <[email protected]> Signed-off-by: David Herrmann <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 1c24113 commit 0abda6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/hid/hid-wiimote-modules.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,9 +1656,9 @@ static void wiimod_pro_in_ext(struct wiimote_data *wdata, const __u8 *ext)
16561656
ry = (ext[6] & 0xff) | ((ext[7] & 0x0f) << 8);
16571657

16581658
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);
16601660
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);
16621662

16631663
input_report_key(wdata->extension.input,
16641664
wiimod_pro_map[WIIMOD_PRO_KEY_RIGHT],

0 commit comments

Comments
 (0)