On 9/14/06, Antoine Labour <[EMAIL PROTECTED]> wrote:
Well, this one is critical. As written before the patch is applied, the
WacomFilterState structure is copied before the filtering happens, and
never copied back into the WacomChannel structure. Actually in -O2
build, a good portion of the code is optimized out (because, in fact, it
does nothing).
 
Ok, I'll aplly this one.

> or wrong (ABS(dsOrig->rotation - dsNew->rotation) > suppress and (1800
> - ABS(dsNew->rotation - dsOrig->rotation)) > suppress can never be
> true the same time).  So, I don't see a reason to apply them.
Oh, they can be true at the same time. Take for example the case
dsOrig->rotation==0, dsNew->rotation==20 (and suppress==10). Actually at
least one of them is always true if suppress<900, so as the code is
written right now, it always exits at this point (without suppressing).
The first condition is for the general case, but gives false positives
when close to the origin, that the second condition removes.
 
What do you think of the following:
 
int diff = ABS(dsOrig->rotation - dsNew->rotation) - 900 ?  
(1800 - ABS(dsNew->rotation - dsOrig->rotation)) : ABS(dsNew->rotation - dsOrig->rotation));
 
if (diff > suppress) return 0;
 
The may reason we have 1800-ABS(...) is to deal with the case that the device rotated from a value just less than 899 (greater than -900) to an value larger than -900 (or less than 899).  That's why I said both were wrong.
 
Ping
 
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Linuxwacom-discuss mailing list
Linuxwacom-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss

Reply via email to