Skip to content

Commit

Permalink
HID: wiimote: fix inverted pro-controller axes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Herrmann authored and Jiri Kosina committed Oct 30, 2013
1 parent 1c24113 commit 0abda6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/hid/hid-wiimote-modules.c
Original file line number Diff line number Diff line change
Expand Up @@ -1656,9 +1656,9 @@ static void wiimod_pro_in_ext(struct wiimote_data *wdata, const __u8 *ext)
ry = (ext[6] & 0xff) | ((ext[7] & 0x0f) << 8);

input_report_abs(wdata->extension.input, ABS_X, lx - 0x800);
input_report_abs(wdata->extension.input, ABS_Y, ly - 0x800);
input_report_abs(wdata->extension.input, ABS_Y, 0x800 - ly);
input_report_abs(wdata->extension.input, ABS_RX, rx - 0x800);
input_report_abs(wdata->extension.input, ABS_RY, ry - 0x800);
input_report_abs(wdata->extension.input, ABS_RY, 0x800 - ry);

input_report_key(wdata->extension.input,
wiimod_pro_map[WIIMOD_PRO_KEY_RIGHT],
Expand Down

0 comments on commit 0abda6f

Please sign in to comment.