On Tue, Jan 18, 2011 at 3:32 PM, Peter Hutterer
<[email protected]> wrote:
> This is the most creative way of not changing a value I've seen so far.
>
> Calculation before the if condition:
>    dx = (filtered.x - priv->oldX) * factorX;
> and this else block then:
>    filtered.x = dx / factorX + priv->oldX;
>
> Ignoring rounding errors (which I doubt matter here) we've just set
> filtered.x to the value it had anyway.

This chuck was introduced to reduce jump when tool makes very slow
movement. When it is slow, the round off may happen in a way that we
end up don't get a movement for some time (changed values are not
enough to make a move).

Well, it is a corner case. We may have other solutions to deal with
this case. Or, we may not even need to deal the case at all. So,

Acked-by: Ping Cheng <[email protected]> for the whole set.

Ping

> Signed-off-by: Peter Hutterer <[email protected]>
> ---
>  src/wcmCommon.c |    9 ---------
>  1 files changed, 0 insertions(+), 9 deletions(-)
>
> diff --git a/src/wcmCommon.c b/src/wcmCommon.c
> index 68fe3b6..4bf4562 100644
> --- a/src/wcmCommon.c
> +++ b/src/wcmCommon.c
> @@ -1280,15 +1280,6 @@ static void commonDispatchDevice(WacomCommonPtr 
> common, unsigned int channel,
>                                return;
>                        }
>                }
> -               else
> -               {
> -                       int temp = deltx;
> -                       deltx = (double)temp/(priv->factorX);
> -                       temp = delty;
> -                       delty = (double)temp/(priv->factorY);
> -                       filtered.x = deltx + priv->oldX;
> -                       filtered.y = delty + priv->oldY;
> -               }
>        }
>
>        /* force out-prox when distance is outside wcmCursorProxoutDist for 
> pucks */
> --
> 1.7.3.4
>
>
> ------------------------------------------------------------------------------
> Protect Your Site and Customers from Malware Attacks
> Learn about various malware tactics and how to avoid them. Understand
> malware threats, the impact they can have on your business, and how you
> can protect your company and customers by using code signing.
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> Linuxwacom-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
>

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to