summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Jay <dinkumator@gmail.com>2009-03-16 23:19:54 -0400
committerPeter Hutterer <peter.hutterer@who-t.net>2009-03-17 13:27:03 +1000
commit740dc202f735106532dce581deabe2b95c52759f (patch)
tree576dee6dc8583923a330b5dc2fb2ef72130daa9f /src
parent7ac0c4456dc0846f7e09f334a26f9536e20065df (diff)
make sure to clear all axis_map entries
don't use uninitialized axis_map entries, ie axis_map[ABS_PRESSURE] Signed-off-by: Jeremy Jay <dinkumator@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r--src/evdev.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/evdev.c b/src/evdev.c
index d4e1073..e736229 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1156,12 +1156,17 @@ EvdevInitButtonMapping(InputInfoPtr pInfo)
static int
EvdevInit(DeviceIntPtr device)
{
+ int i;
InputInfoPtr pInfo;
EvdevPtr pEvdev;
pInfo = device->public.devicePrivate;
pEvdev = pInfo->private;
+ /* clear all axis_map entries */
+ for(i = 0; i < max(ABS_CNT,REL_CNT); i++)
+ pEvdev->axis_map[i]=-1;
+
if (pEvdev->flags & EVDEV_KEYBOARD_EVENTS)
EvdevAddKeyClass(device);
if (pEvdev->flags & EVDEV_BUTTON_EVENTS)