From b5ece46b76c9182a077141505cc0e788c0fca3ea Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Sat, 17 Jan 2009 20:07:40 +0200 Subject: [PATCH] Input: Clarify valuator FatalError messages Signed-off-by: Daniel Stone Signed-off-by: Peter Hutterer --- Xi/exevents.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 8117ec4ca..bf9d16736 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -753,10 +753,11 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count) int first = xV->first_valuator; BOOL change = FALSE; - if (xV->num_valuators && - (!v || (xV->num_valuators && - (first + xV->num_valuators > v->numAxes)))) - FatalError("Bad valuators reported for device %s\n", + if (xV->num_valuators && !v) + FatalError("Valuators reported for non-valuator device '%s'\n", + device->name); + if (first + xV->num_valuators > v->numAxes) + FatalError("Too many valuators reported for device '%s'\n", device->name); if (v && v->axisVal) { /* v->axisVal is always in absolute coordinates. Only the