From 6ab23e4519ed4ce07b745c573ddf544a2a1ee1b2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 18 Jun 2009 16:15:16 +1000 Subject: Add missing checks for ABI_XINPUT_VERSION 7. Signed-off-by: Peter Hutterer --- src/evdev.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/evdev.c b/src/evdev.c index 7dc8eb4..1d2ca36 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1033,7 +1033,10 @@ EvdevAddAbsClass(DeviceIntPtr device) if (!TestBit(axis, pEvdev->abs_bitmask)) continue; pEvdev->axis_map[axis] = i; - xf86InitValuatorAxisStruct(device, i, atoms[axis], + xf86InitValuatorAxisStruct(device, i, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 + atoms[axis], +#endif pEvdev->absinfo[axis].minimum, pEvdev->absinfo[axis].maximum, 10000, 0, 10000); @@ -1127,7 +1130,11 @@ EvdevAddRelClass(DeviceIntPtr device) if (axnum == -1) continue; - xf86InitValuatorAxisStruct(device, axnum, atoms[axnum], -1, -1, 1, 0, 1); + xf86InitValuatorAxisStruct(device, axnum, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 + atoms[axnum], +#endif + -1, -1, 1, 0, 1); xf86InitValuatorDefaults(device, axnum); } @@ -1154,7 +1161,11 @@ EvdevAddButtonClass(DeviceIntPtr device) labels = xalloc(pEvdev->num_buttons * sizeof(Atom)); EvdevInitButtonLabels(pEvdev, pEvdev->num_buttons, labels); - if (!InitButtonClassDeviceStruct(device, pEvdev->num_buttons, labels, pEvdev->btnmap)) + if (!InitButtonClassDeviceStruct(device, pEvdev->num_buttons, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 + labels, +#endif + pEvdev->btnmap)) return !Success; xfree(labels); -- cgit v1.2.3