diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-02-03 08:15:05 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-02-03 08:15:45 +0100 |
commit | 04f63f6f9847a180923e766667cf99d5ad08b129 (patch) | |
tree | 4c5d513cc39ac387522992226d3718870c40f73c /proto-mouse/ftnoir_protocol_mouse.cpp | |
parent | 0c621d5a2ebb41a0111a63ab0e32912033d0f771 (diff) |
proto/mouse: bring back NOCOALESCE
Diffstat (limited to 'proto-mouse/ftnoir_protocol_mouse.cpp')
-rw-r--r-- | proto-mouse/ftnoir_protocol_mouse.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/proto-mouse/ftnoir_protocol_mouse.cpp b/proto-mouse/ftnoir_protocol_mouse.cpp index 2b3af2f0..d57d8809 100644 --- a/proto-mouse/ftnoir_protocol_mouse.cpp +++ b/proto-mouse/ftnoir_protocol_mouse.cpp @@ -12,8 +12,13 @@ #include <cmath> #include <algorithm> + #include <windows.h> +#ifndef MOUSEEVENTF_MOVE_NOCOALESCE +# define MOUSEEVENTF_MOVE_NOCOALESCE 0x2000 +#endif + static const double invert[] = { 1., 1., 1., 1., -1., 1. @@ -56,7 +61,7 @@ void mouse::pose(const double* headpose) mi = {}; mi.dx = dx; mi.dy = dy; - mi.dwFlags = MOUSEEVENTF_MOVE; + mi.dwFlags = MOUSEEVENTF_MOVE | MOUSEEVENTF_MOVE_NOCOALESCE; (void)SendInput(1, &input, sizeof(input)); |