From c968040cde4e1a7c73332701008f6abfb1fa3ab3 Mon Sep 17 00:00:00 2001 From: "Zephaniah E. Hull" Date: Sun, 9 Apr 2006 00:41:42 +0000 Subject: Remove a debugging message. Actually, well, _work_. Note, abs support still segfaults, I'll debug it after I've slept. But I should get it tomorrow. --- src/evdev.c | 4 ---- src/evdev_axes.c | 14 +++++++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/evdev.c b/src/evdev.c index 94ff353..ab9325e 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -420,10 +420,6 @@ EvdevCorePreInit(InputDriverPtr drv, IDevPtr dev, int flags) pEvdev->pass = 0; - xf86Msg(X_CONFIG, "%s: name: %s, phys: %s, device: %s, pass: %d.\n", - dev->identifier, pEvdev->name, pEvdev->phys, pEvdev->device, - pEvdev->pass); - pEvdev->callback = EvdevNew; pEvdev->dev = dev; diff --git a/src/evdev_axes.c b/src/evdev_axes.c index a164f84..55de247 100644 --- a/src/evdev_axes.c +++ b/src/evdev_axes.c @@ -485,11 +485,19 @@ EvdevAxisRelNew(InputInfoPtr pInfo) int EvdevAxesNew (InputInfoPtr pInfo) { + evdevDevicePtr pEvdev = pInfo->private; + evdevStatePtr state = &pEvdev->state; int ret = Success; + + state->axes = Xcalloc (sizeof (evdevAxesRec)); if (EvdevAxisAbsNew(pInfo) != Success) ret = !Success; if (EvdevAxisRelNew(pInfo) != Success) ret = !Success; + if (!state->abs && !state->rel) { + Xfree (state->axes); + state->axes = NULL; + } return ret; } @@ -511,9 +519,13 @@ EvdevAxesInit (DeviceIntPtr device) if (state->abs && state->abs->axes > axes) axes = state->abs->axes; - if (state->abs && state->rel->axes > axes) + if (state->rel && state->rel->axes > axes) axes = state->rel->axes; + state->axes->axes = axes; + + xf86Msg(X_CONFIG, "%s: %d valuators.\n", pInfo->name, + axes); if (!axes) return Success; -- cgit v1.2.3