We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a5f62b5 + 390aace commit d1e91c7Copy full SHA for d1e91c7
Jiggler.cs
@@ -31,16 +31,18 @@ public static class Jiggler
31
32
public static void Jiggle (int dx, int dy)
33
{
34
- var inp = new INPUT ();
35
- inp.TYPE = Jiggler.INPUT_MOUSE;
36
- inp.dx = dx;
37
- inp.dy = dy;
38
- inp.mouseData = 0;
39
- inp.dwFlags = Jiggler.MOUSEEVENTF_MOVE;
40
- inp.time = 0;
41
- inp.dwExtraInfo = (IntPtr) 0;
42
-
43
- if (SendInput (1, ref inp, 28) != 1)
+ var inp = new INPUT
+ {
+ TYPE = Jiggler.INPUT_MOUSE,
+ dx = dx,
+ dy = dy,
+ mouseData = 0,
+ dwFlags = Jiggler.MOUSEEVENTF_MOVE,
+ time = 0,
+ dwExtraInfo = (IntPtr) 0
+ };
44
+
45
+ if (SendInput (1, ref inp, Marshal.SizeOf (inp)) != 1)
46
throw new Win32Exception ();
47
}
48
0 commit comments