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.
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