Skip to content

Commit

Permalink
Improve conversion accuracy.
Browse files Browse the repository at this point in the history
  • Loading branch information
octalmage committed Oct 25, 2015
1 parent b2745cc commit b0258ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ void moveMouse(MMPoint point)
0, 0, 0, 0, point.x, point.y);
XFlush(display);
#elif defined(IS_WINDOWS)
point.x *= 0xFFFF / GetSystemMetrics(SM_CXSCREEN);
point.y *= 0xFFFF / GetSystemMetrics(SM_CYSCREEN);
point.x *= 65536.0f / GetSystemMetrics(SM_CXSCREEN);
point.y *= 65536.0f / GetSystemMetrics(SM_CYSCREEN);
mouse_event(MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE,
(DWORD)point.x, (DWORD)point.y, 0, 0);
#endif
Expand Down

0 comments on commit b0258ad

Please sign in to comment.