summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2009-01-17 20:07:40 +0200
committerDaniel Stone <daniel@fooishbar.org>2009-01-22 15:09:00 +1100
commitb5ece46b76c9182a077141505cc0e788c0fca3ea (patch)
tree97f444730d4093491d7798c9739fe2b663ca1909
parentddb46c1421a98190313b79621c0f5ae43b97d3f6 (diff)
Input: Clarify valuator FatalError messages
Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--Xi/exevents.c9
1 files 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