From 664a8e37fd83141974b772980f680b94e48b4f87 Mon Sep 17 00:00:00 2001 From: Lee Leahu Date: Sat, 17 Oct 2009 00:45:44 -0500 Subject: [PATCH] dmx: when setting up device axis, use the correct counter number Signed-off-by: Peter Hutterer --- hw/dmx/input/dmxinputinit.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c index 6d04305af..5a486a464 100644 --- a/hw/dmx/input/dmxinputinit.c +++ b/hw/dmx/input/dmxinputinit.c @@ -474,9 +474,9 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what) Relative); for (i = 0; i < info.numRelAxes; i++) InitValuatorAxisStruct(pDevice, i, axis_labels[i], - info.minval[0], info.maxval[0], - info.res[0], - info.minres[0], info.maxres[0]); + info.minval[i], info.maxval[i], + info.res[i], + info.minres[i], info.maxres[i]); } else if (info.numRelAxes) { InitValuatorClassDeviceStruct(pDevice, info.numRelAxes, axis_labels, @@ -484,20 +484,20 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what) Relative); for (i = 0; i < info.numRelAxes; i++) InitValuatorAxisStruct(pDevice, i, axis_labels[i], - info.minval[0], - info.maxval[0], info.res[0], - info.minres[0], info.maxres[0]); + info.minval[i], + info.maxval[i], info.res[i], + info.minres[i], info.maxres[i]); } else if (info.numAbsAxes) { InitValuatorClassDeviceStruct(pDevice, info.numAbsAxes, axis_labels, dmxPointerGetMotionBufferSize(), Absolute); for (i = 0; i < info.numAbsAxes; i++) - InitValuatorAxisStruct(pDevice, i+info.numRelAxes, - axis_labels[i + info.numRelAxes], - info.minval[i+1], info.maxval[i+1], - info.res[i+1], info.minres[i+1], - info.maxres[i+1]); + InitValuatorAxisStruct(pDevice, i, + axis_labels[i], + info.minval[i], info.maxval[i], + info.res[i], info.minres[i], + info.maxres[i]); } } if (info.focusClass) InitFocusClassDeviceStruct(pDevice);