Add clamping to Gyro Mouse Joystick vertical scale

Related to issue #1144
This commit is contained in:
Travis Nickles 2020-03-11 19:28:42 -05:00
parent 58fb682a6e
commit 982c234fa7

View File

@ -279,6 +279,8 @@ namespace DS4Windows
{
double verticalScale = msinfo.vertScale * 0.01;
deltaY = (int)(deltaY * verticalScale);
deltaY = (deltaY < 0 && deltaY < maxValY) ? maxValY :
(deltaY > 0 && deltaY > maxValY) ? maxValY : deltaY;
}
if (deltaX != 0) xratio = deltaX / (double)maxValX;