Skip to content

Commit b3e18e4

Browse files
Add Coord constant
1 parent d3634ba commit b3e18e4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/win32/mouse.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
#define M_SQRT2 1.4142135623730950488016887 /* Fix for MSVC. */
88
#endif
99

10+
/**
11+
* This constant is required as Windows divides the entire
12+
* screen space into 65536 segments in both X and Y axes
13+
* irrespective of resolution
14+
* https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-mouseinput#remarks
15+
*/
16+
#define ABSOLUTE_COORD_CONST 65536
17+
18+
1019
#define MMMouseToMEventF(down, button) \
1120
(down ? MMMouseDownToMEventF(button) : MMMouseUpToMEventF(button))
1221

0 commit comments

Comments
 (0)