Skip to content

Commit d3634ba

Browse files
Indentation
1 parent 5cf4c8f commit d3634ba

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

src/win32/mouse.c

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,33 +20,30 @@
2020
: ((button) == RIGHT_BUTTON ? MOUSEEVENTF_RIGHTDOWN \
2121
: MOUSEEVENTF_MIDDLEDOWN))
2222

23-
int CalculateAbsoluteCoordinateX(int x)
24-
{
23+
int CalculateAbsoluteCoordinateX(int x) {
2524
MMSize displaySize = getMainDisplaySize();
26-
return (x * 65536) / displaySize.width;
25+
return (x * 65536) / displaySize.width;
2726
}
2827

29-
int CalculateAbsoluteCoordinateY(int y)
30-
{
28+
int CalculateAbsoluteCoordinateY(int y) {
3129
MMSize displaySize = getMainDisplaySize();
32-
return (y * 65536) / displaySize.height;
30+
return (y * 65536) / displaySize.height;
3331
}
3432

3533
/**
3634
* Move the mouse to a specific point.
3735
* @param point The coordinates to move the mouse to (x, y).
3836
*/
39-
void moveMouse(MMPoint point)
40-
{
41-
INPUT mouseInput;
37+
void moveMouse(MMPoint point) {
38+
INPUT mouseInput;
4239
mouseInput.type = INPUT_MOUSE;
4340
mouseInput.mi.dx = CalculateAbsoluteCoordinateX(point.x);
4441
mouseInput.mi.dy = CalculateAbsoluteCoordinateY(point.y);
45-
mouseInput.mi.mouseData = 0;
42+
mouseInput.mi.mouseData = 0;
4643
mouseInput.mi.time = 0;
47-
mouseInput.mi.dwFlags = MouseEventFlags.MOUSEEVENTF_MOVE | MouseEventFlags.MOUSEEVENTF_ABSOLUTE;
48-
mouseInput.mi.dwExtraInfo = 0;
49-
SendInput(1, &mouseInput, sizeof(mouseInput));
44+
mouseInput.mi.dwFlags = MouseEventFlags.MOUSEEVENTF_MOVE | MouseEventFlags.MOUSEEVENTF_ABSOLUTE;
45+
mouseInput.mi.dwExtraInfo = 0;
46+
SendInput(1, & mouseInput, sizeof(mouseInput));
5047
}
5148

5249
void dragMouse(MMPoint point, const MMMouseButton button)

0 commit comments

Comments
 (0)