The rounding of the floating point division was not done quite correctly.
Closes #13383.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70797
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
int displayx, displayy;
wxDisplaySize(&displayx, &displayy);
int displayx, displayy;
wxDisplaySize(&displayx, &displayy);
- int scaledx = wxRound(((float)x / displayx) * 65535);
- int scaledy = wxRound(((float)y / displayy) * 65535);
+ int scaledx = std::ceil((float)x * 65535.0 / (displayx-1));
+ int scaledy = std::ceil((float)y * 65535.0 / (displayy-1));
mouse_event(MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE, scaledx, scaledy, 0, 0);
return true;
mouse_event(MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE, scaledx, scaledy, 0, 0);
return true;