Follow-up to 4971315296cb. countValuatorEvents was copied from GKVE where it
was obviously broken but nobody noticed. GPE had the correct version, but that
one got lost during de-duplication. Restoring the correct calculation - if we
have 6 valuators, we want 1 valuator event, not 2.
Signed-off-by: Peter Hutterer <[EMAIL PROTECTED]>
---
dix/getevents.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dix/getevents.c b/dix/getevents.c
index 82be5e9..ae91543 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -728,9 +728,9 @@ static int
countValuatorEvents(int num_valuators)
{
if (num_valuators) {
- if ((num_valuators / 6) + 1 > MAX_VALUATOR_EVENTS)
+ if (((num_valuators - 1) / 6) + 1 > MAX_VALUATOR_EVENTS)
num_valuators = MAX_VALUATOR_EVENTS;
- return (num_valuators / 6) + 1;
+ return ((num_valuators - 1)/ 6) + 1;
} else
return 0;
}
--
1.6.0.4
_______________________________________________
xorg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xorg