Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is _MOUSEMOVEMENTY and _MOUSEMOVEMENTX supposed to act this way?
#2
I believe I know the issue, basically `_MouseMovementX` and `_MouseMovementY` do not just report the delta between mouse X/Y in movement, they actually report movement information more directly from the mouse itself. You can read about it a bit here. The reason it doesn't accurately track your cursor is because Windows doesn't just move your cursor X units for every Y  movement units reported by the mouse, rather it applies the "speed" and "acceleration" pointer settings. This distinction is good for things like games where you're hiding the cursor anyway (and thus you get more accurate info to work with), but not if you're just trying to track where the cursor is.

You can kinda see this if you go into the `Mouse Properties` and turn off `Enhance pointer precision`, that's basically the acceleration setting. When it's off the mouse position reported by your program stays more or less accurate (as far as I can tell). The distance it thinks you traveled is still wrong though because that's dependent on your "mouse pointer speed".
Reply


Messages In This Thread
RE: Is _MOUSEMOVEY and _MOUSEMOVEX supposed to act this way? - by DSMan195276 - 11-01-2022, 03:00 AM



Users browsing this thread: 7 Guest(s)