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.
1 parent b3e18e4 commit e4a8b4fCopy full SHA for e4a8b4f
src/win32/mouse.c
@@ -29,14 +29,9 @@
29
: ((button) == RIGHT_BUTTON ? MOUSEEVENTF_RIGHTDOWN \
30
: MOUSEEVENTF_MIDDLEDOWN))
31
32
-int CalculateAbsoluteCoordinateX(int x) {
+int CalculateAbsoluteCoordinates(MMPoint point) {
33
MMSize displaySize = getMainDisplaySize();
34
- return (x * 65536) / displaySize.width;
35
-}
36
-
37
-int CalculateAbsoluteCoordinateY(int y) {
38
- MMSize displaySize = getMainDisplaySize();
39
- return (y * 65536) / displaySize.height;
+ return MMPointMake((x / displaySize.width) * ABSOLUTE_COORD_CONST, (y / displaySize.height) * ABSOLUTE_COORD_CONST);
40
}
41
42
/**
0 commit comments