Skip to content

Commit

Permalink
speedup mousehook
Browse files Browse the repository at this point in the history
  • Loading branch information
Valkirie committed Nov 13, 2021
1 parent a44d428 commit 8d61d71
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ControllerHelper/MouseHook.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using ControllerService;
using Gma.System.MouseKeyHook;
using System;
using System.Threading;
using System.Timers;
using System.Windows.Forms;
Expand Down Expand Up @@ -53,9 +54,7 @@ private void OnMouseDown(object sender, MouseEventExtArgs e)

private void OnMouseMove(object sender, MouseEventExtArgs e)
{
short TouchX = (short)(e.X);
short TouchY = (short)(e.Y);
client.SendMessage(new PipeMessage { Code = PipeCode.CODE_CURSOR_MOVE, args = new string[] { TouchX.ToString(), TouchY.ToString() } });
client.SendMessage(new PipeMessage { Code = PipeCode.CODE_CURSOR_MOVE, args = new string[] { Convert.ToString(e.X), Convert.ToString(e.Y) } });
}

private void OnMouseUp(object sender, MouseEventExtArgs e)
Expand Down

0 comments on commit 8d61d71

Please sign in to comment.