Blender Git Loki

Git Commits -> Revision f227a69

Revision f227a69 by Nicholas Rishel (master)
February 23, 2021, 21:29 (GMT)
Revert high fequency mouse input for Windows.

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.

Reviewed By: brecht

Maniphest Tasks: T85874

Differential Revision: https://developer.blender.org/D10507

Commit Details:

Full Hash: f227a69a87307491e2375f5778d3da6f5653f47d
Parent Commit: 8d02fdc
Lines Changed: +40, -133

2 Modified Paths:

/intern/ghost/intern/GHOST_SystemWin32.cpp (+38, -115) (Diff)
/intern/ghost/intern/GHOST_SystemWin32.h (+2, -18) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021