dmx: when setting up device axis, use the correct counter number
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
010d5e2865
commit
664a8e37fd
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user