Page MenuHome

Revert high fequency mouse input for Windows.
ClosedPublic

Authored by Nicholas Rishel (nicholas_rishel) on Feb 23 2021, 6:10 AM.

Details

Summary

Windows mouse history function GetMouesMovePointsEx has well documented
bugs where it receives and returns 32 bit screen coordinates, but
internally truncates to unsigned 16 bits. For mouse (relative position)
input this is not a problem as motion events and the resulting screen
coordinates reliably fit within 16 bit precision.

For tablets (absolute position) the 16 bit truncation results in
corrupt history when tablet drivers use mouse_event or SendInput from
the Windows API to move the mouse cursor. Both of these functions take
absolute mouse position as singed 32 bit value on the range of 0-65535
(or 0x0-0xFFFF) inclusive. Values larger than 0x7FFF (the largest
signed 16 bit value) are reliably corrupt when retrieved from
GetMouesMovePointsEx history. This is true regardless of whether mouse
history is retrieved using display resolution (GMMP_USE_DISPLAY_POINTS)
or high resolution points (GMMP_USE_HIGH_RESOLUTION_POINTS), the latter
of which should return points in range 0-65535.

Diff Detail

Repository
rB Blender

Event Timeline

Nicholas Rishel (nicholas_rishel) created this revision.
Brecht Van Lommel (brecht) requested changes to this revision.Feb 23 2021, 11:27 AM

Comparing blender-v2.92-release with this patch applied to blender-v2.91-release, there are still a bunch of changes:
P1982

Can we revert everything to be sure that there are no remaining issues? Or is there something important in there that needs to remain?

If we revert only part of the changes, we might end up in the same situation where there is still a remaining regression that we did not anticipate.

This revision now requires changes to proceed.Feb 23 2021, 11:27 AM
  • Fix T85844: high pressure at start of line.
  • Revert Automatic Tablet API dynamic fallback.
This revision is now accepted and ready to land.Feb 23 2021, 8:05 PM