Squash x and y coord methods

Make Absolute coord calculation return MMPoint
This commit is contained in:
Reiss Cashmore
2021-10-10 22:32:18 +01:00
parent b3e18e4fbf
commit e4a8b4fd6d
+2 -7
View File
@@ -29,14 +29,9 @@
: ((button) == RIGHT_BUTTON ? MOUSEEVENTF_RIGHTDOWN \
: MOUSEEVENTF_MIDDLEDOWN))
int CalculateAbsoluteCoordinateX(int x) {
int CalculateAbsoluteCoordinates(MMPoint point) {
MMSize displaySize = getMainDisplaySize();
return (x * 65536) / displaySize.width;
}
int CalculateAbsoluteCoordinateY(int y) {
MMSize displaySize = getMainDisplaySize();
return (y * 65536) / displaySize.height;
return MMPointMake((x / displaySize.width) * ABSOLUTE_COORD_CONST, (y / displaySize.height) * ABSOLUTE_COORD_CONST);
}
/**