diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2013-10-28 16:47:53 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-04 19:05:53 (GMT) |
commit | 609019e277fe8b271c2138b18369c3053aeb9a7b (patch) | |
tree | 1f04130b63bf9def61f2313b8d6489e7ff30175d | |
parent | 5ec3e763796bb778fb54663397c4df55967950cc (diff) | |
download | linux-fsl-qoriq-609019e277fe8b271c2138b18369c3053aeb9a7b.tar.xz |
HID: wiimote: fix inverted pro-controller axes
commit 0abda6fa81dced031e3df31ac29bfb253549c2d1 upstream.
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).
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/hid/hid-wiimote-modules.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/hid-wiimote-modules.c b/drivers/hid/hid-wiimote-modules.c index 71adf9e..e30567a 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) 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], |