[Bug 42631] Mouse drift, jump or don' t react to small slow movements in Unity-engine games and Fallout 4 ( partly fixed in Unity games, have walkaround in Fallout4 )

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Aug 29 10:37:19 CDT 2018


https://bugs.winehq.org/show_bug.cgi?id=42631

Jordan Galby <gravemind2a+wine at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #62138|0                           |1
        is obsolete|                            |

--- Comment #57 from Jordan Galby <gravemind2a+wine at gmail.com> ---
Created attachment 62161
  --> https://bugs.winehq.org/attachment.cgi?id=62161
Fix sub pixel raw motion v3

I fixed it to C99 comments (sorry), and tweaked them to describe a bit more
"why" than "how". I guess it would be wiser to consider it as a POC rather than
a "submittable fix" for now. For example:
- I'm wondering if there could be a better place for `double accum;` ?
- should `accum` be initialized to `0` or the current pixel fraction of the
absolute position ?
- is there a windows API that can handle sub-pixel mouse motion ? (or mouse dpi
?)
- etc...
(I hope here is the good place to post all this)

The issue I tried to fix was that X11's "raw motion" can be fractions (eg 0.2
px, depending on mouse dpi and AccelSpeed), but windows' INPUT's are LONG, and
the code implicitly casted X11's double to LONG. The result was that slow mouse
motion were cast to 0.

In The Witcher 3, My **guess** was that everything was fine as long as the game
could use absolute mouse position, but as soon as the position went outside the
screen (getting clamped (?)) the game seemed to switch to using relative mouse
motion (RawMotion) and suddenly slow mouse motion got blocked/ignored (if you
moved slow enough then, you'd hit a "seemingly random wall").

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list