Skip to content

Commit

Permalink
W10: Fixed ABS_LY overflowing, ABS_RY inverted. Ref #215
Browse files Browse the repository at this point in the history
  • Loading branch information
kozec committed Dec 29, 2018
1 parent 0d05aac commit 521f9e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/virtual-device/uinput-win32/vigem_gamepad.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ static void scc_virtual_xusb_set_axis(struct Internal* idev, Axis a, AxisValue v
idev->xusb_report.sThumbLX = value;
return scc_virtual_xusb_update(idev);
case ABS_Y:
idev->xusb_report.sThumbLY = -value;
idev->xusb_report.sThumbLY = -((int32_t)value+1);
return scc_virtual_xusb_update(idev);
case ABS_Z:
idev->xusb_report.bLeftTrigger = (uint8_t)value;
Expand All @@ -262,7 +262,7 @@ static void scc_virtual_xusb_set_axis(struct Internal* idev, Axis a, AxisValue v
idev->xusb_report.sThumbRX = value;
return scc_virtual_xusb_update(idev);
case ABS_RY:
idev->xusb_report.sThumbRY = value;
idev->xusb_report.sThumbRY = -((int32_t)value+1);
return scc_virtual_xusb_update(idev);
case ABS_RZ:
idev->xusb_report.bRightTrigger = (uint8_t)value;
Expand Down

0 comments on commit 521f9e9

Please sign in to comment.