At 02\11\01 11:52 -0800 Friday, Michael Toomim wrote:
>Soeren Sandmann wrote:
>
>> Back in May this year I sent the mail below to [EMAIL PROTECTED], but
>> I never got any response.
>
>That sucks!  Would it be rude to send it again?
>
>I like the idea of changing the acceleration formula completely (as you
>have done) rather than introducing a new XF86Config option to change it
>(as I had suggested).
>

The XFree86 mouse deceleration function gets dx,dy integers that are
small integers in between -1 and +1 quite often. Whatever the function
("formula") was, it could be replaced with these two without much change:

  dx' = k1 * dx * (+1 if dx > 0 else -1)
  dx' = k2 * dx

         [dx is a C int, dx' is real that is added to a real sum and then
         later converted into a screen pixel position]

Mr David Dawes was replying to some e-mail on the topic of the mouse
deceleration algorithm. He told me about Opensource projects.

What could be done is this:

* xf86PostMotionEvent() is repeatedly called. EAch time it is called,
 the dx,dy and time values are saved.

* an algorithm averages the last k dx (and dy) values. The function
 that calculates k is not too simple. Certainly k is not a constant
 since that can lead to a slow mouse pointer appearing to have inertia.

I presume patches aiming to tweak functions ought be filed/etc away
while there is not some substantially better averaging algorithm in
the XFree86 source code.


xf86PostMotionEvent():
http://cvsweb.xfree86.org/cvsweb/xc/programs/Xserver/hw/xfree86/common/xf86Xinput.c


Craig Carey

_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to