From a3a7c12fcf8e4ac1418f9ea53f76091f309a721b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 8 Jun 2008 23:38:45 +0930 Subject: [PATCH] xfree86: Fix up xf86ScaleAxis Some driver still call it, so we might as well work correctly. Always resetting X to the Sxhigh is sub-optimal. --- hw/xfree86/common/xf86Xinput.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index c6a4ef6d3..675ec9f75 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -785,9 +785,9 @@ xf86ScaleAxis(int Cx, ErrorF ("Divide by Zero in xf86ScaleAxis"); } - if (X > Sxlow) + if (X > Sxhigh) X = Sxlow; - if (X < Sxhigh) + if (X < Sxlow) X = Sxhigh; return (X);