Skip to content

Commit

Permalink
fix: 优化性能
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Wang committed Sep 25, 2024
1 parent cdfc4d9 commit 687820b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MousePositionRecorder/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ private async Task Record()
if (startRecording)
{
var pt = MousePositionHelper.GetMousePosition();
Debug.WriteLine($"{pt.X}, {pt.Y}");
if (pt != lastPoint)
//Debug.WriteLine($"{pt.X}, {pt.Y}");
if (pt != lastPoint && (pt - lastPoint).Length > 5)
DrawLine(pt);
else
{
Expand Down

0 comments on commit 687820b

Please sign in to comment.