What steps will reproduce the problem?
1. dbPositionMouse(dbMouseX(), dbMouseY());
What is the expected output? What do you see instead?
As long as the mouse pointer is within the window, it should remain still and
under normal user control. But what happens is that it tends to move in a
straight line, on its own.
Please provide any additional information below.
I tracked down the cause. The mouse position calculations are scaled according
to the current window size (i.e. if the window has been resized by the user,
maximized, etc). And the scale is a floating point calculation. However the
input and output position information is quantized to integers. So there is
continuous truncation of essential precision needed to keep the mouse stable.
Thus, in my own copy of the source code, I changed those mouse position
variables (including how they're used and recalculated in the various
functions) from ints to floats. This solved the problem. The mouse is now
stable whether it's in full-screen, windowed mode, or maximized window mode.
Original issue reported on code.google.com by
pcowe...@yahoo.comon 30 Nov 2014 at 7:42