From 4777ab2a246039ff8495e9aea5b08dde0939f7ab Mon Sep 17 00:00:00 2001 From: Simon Thum Date: Thu, 30 Apr 2009 12:58:48 +0200 Subject: [PATCH] dix: fix warning in pointer acceleration newer gccs warn against this, and lrounf is also better on insane processors like the P4. --- dix/ptrveloc.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c index 603a189..d7fcd44 100644 --- a/dix/ptrveloc.c +++ b/dix/ptrveloc.c @@ -1003,14 +1003,15 @@ acceleratePointerPredictable( if (dx) { tmp = mult * fdx + pDev->last.remainder[0]; - *px = (int)roundf(tmp); + *px = lroundf(tmp); pDev->last.remainder[0] = tmp - (float)*px; } if (dy) { tmp = mult * fdy + pDev->last.remainder[1]; - *py = (int)roundf(tmp); + *py = lroundf(tmp); pDev->last.remainder[1] = tmp - (float)*py; } + DebugAccelF("pos (%i | %i) remainders x: %.3f y: %.3f delta x:%.3f y:%.3f\n", *px, *py, pDev->last.remainder[0], pDev->last.remainder[1], fdx, fdy); } } } -- 1.6.0.6