summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Leahu <freedesktop-bugs@dyweni.com>2009-10-17 00:45:44 -0500
committerPeter Hutterer <peter.hutterer@who-t.net>2009-10-20 13:32:19 +1000
commit664a8e37fd83141974b772980f680b94e48b4f87 (patch)
tree67858e4935c265b5164d1eaf261a1d5b5d0470f5
parent010d5e28655d619693632938e9e4325eef938295 (diff)
dmx: when setting up device axis, use the correct counter number
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--hw/dmx/input/dmxinputinit.c22
1 files 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);