summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorSimon Thum <simon.thum@gmx.de>2009-03-21 18:19:19 +0100
committerPeter Hutterer <peter.hutterer@who-t.net>2009-06-07 09:31:07 +1000
commit707b1241681c33401d5e0eb6edeace33f5970928 (patch)
tree9660ed249be34562401237bbc9ed9496a1982581 /dix
parentef0e435052b2fda598cd8670c8e892aea685a102 (diff)
dix: prefer lroundf() over roundf() in axis scaling
it's unclear whether there actually is a problem, but in a very similar case there is (bug#21456). Also, integer addition is generally faster. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix')
-rw-r--r--dix/getevents.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dix/getevents.c b/dix/getevents.c
index 83aedbe35..9b1908cbb 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -260,7 +260,7 @@ rescaleValuatorAxis(int coord, AxisInfoPtr from, AxisInfoPtr to,
if(fmax == fmin) /* avoid division by 0 */
return 0;
- return roundf(((float)(coord - fmin)) * (tmax - tmin) /
+ return lroundf(((float)(coord - fmin)) * (tmax - tmin) /
(fmax - fmin)) + tmin;
}