Skip to content

Commit 38cba5e

Browse files
committed
Calculate touch transformation matrix using the Pen digitizer's specs instead to match the used matrix
1 parent 58f6f2d commit 38cba5e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

OTD.EnhancedOutputMode/Output/EnhancedRelativeOutputMode.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,18 @@ public void Initialize()
4848
foreach (var filter in Filters.OfType<IInitialize>())
4949
filter.Initialize();
5050

51-
UpdateTransformMatrix(TouchSettings);
52-
5351
// we don't want to initialize again
5452
_firstReport = false;
5553
}
5654

57-
private void UpdateTransformMatrix(TouchSettings touchSettings)
55+
private void UpdateTransformMatrix()
5856
{
5957
this.TouchTransformationMatrix = Matrix3x2.CreateRotation(
6058
(float)(-Rotation * System.Math.PI / 180));
6159

6260
this.TouchTransformationMatrix *= Matrix3x2.CreateScale(
63-
Sensitivity.X * ((Tablet?.Digitizer?.Width / touchSettings?.MaxX) ?? 0.01f),
64-
Sensitivity.Y * ((Tablet?.Digitizer?.Height / touchSettings?.MaxY) ?? 0.01f));
61+
Sensitivity.X * ((Tablet?.Digitizer?.Width / Tablet?.Digitizer?.MaxX) ?? 0.01f),
62+
Sensitivity.Y * ((Tablet?.Digitizer?.Height / Tablet?.Digitizer?.MaxY) ?? 0.01f));
6563
}
6664

6765
public override void Read(IDeviceReport report)

0 commit comments

Comments
 (0)