dmx: pass button/axis labels into the init functions (currently unset)
Currently only None labels are passed in, in the future these labels should be whatever the respective buttions/axes are. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
af85973a0a
commit
63155cf985
|
@ -436,6 +436,8 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what)
|
||||||
int fd;
|
int fd;
|
||||||
DMXLocalInitInfo info;
|
DMXLocalInitInfo info;
|
||||||
int i;
|
int i;
|
||||||
|
Atom btn_labels[MAX_BUTTONS] = {0}; /* FIXME */
|
||||||
|
Atom axis_labels[MAX_VALUATORS] = {0}; /* FIXME */
|
||||||
|
|
||||||
if (dmxInput->detached) return Success;
|
if (dmxInput->detached) return Success;
|
||||||
|
|
||||||
|
@ -457,31 +459,38 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what)
|
||||||
dmxBell, dmxKbdCtrl);
|
dmxBell, dmxKbdCtrl);
|
||||||
}
|
}
|
||||||
if (info.buttonClass) {
|
if (info.buttonClass) {
|
||||||
InitButtonClassDeviceStruct(pDevice, info.numButtons, info.map);
|
InitButtonClassDeviceStruct(pDevice, info.numButtons,
|
||||||
|
btn_labels, info.map);
|
||||||
}
|
}
|
||||||
if (info.valuatorClass) {
|
if (info.valuatorClass) {
|
||||||
if (info.numRelAxes && dmxLocal->sendsCore) {
|
if (info.numRelAxes && dmxLocal->sendsCore) {
|
||||||
InitValuatorClassDeviceStruct(pDevice, info.numRelAxes,
|
InitValuatorClassDeviceStruct(pDevice, info.numRelAxes,
|
||||||
|
axis_labels,
|
||||||
GetMaximumEventsNum(),
|
GetMaximumEventsNum(),
|
||||||
Relative);
|
Relative);
|
||||||
for (i = 0; i < info.numRelAxes; i++)
|
for (i = 0; i < info.numRelAxes; i++)
|
||||||
InitValuatorAxisStruct(pDevice, i, info.minval[0],
|
InitValuatorAxisStruct(pDevice, i, axis_labels[i],
|
||||||
info.maxval[0], info.res[0],
|
info.minval[0], info.maxval[0],
|
||||||
|
info.res[0],
|
||||||
info.minres[0], info.maxres[0]);
|
info.minres[0], info.maxres[0]);
|
||||||
} else if (info.numRelAxes) {
|
} else if (info.numRelAxes) {
|
||||||
InitValuatorClassDeviceStruct(pDevice, info.numRelAxes,
|
InitValuatorClassDeviceStruct(pDevice, info.numRelAxes,
|
||||||
|
axis_labels,
|
||||||
dmxPointerGetMotionBufferSize(),
|
dmxPointerGetMotionBufferSize(),
|
||||||
Relative);
|
Relative);
|
||||||
for (i = 0; i < info.numRelAxes; i++)
|
for (i = 0; i < info.numRelAxes; i++)
|
||||||
InitValuatorAxisStruct(pDevice, i, info.minval[0],
|
InitValuatorAxisStruct(pDevice, i, axis_labels[i],
|
||||||
|
info.minval[0],
|
||||||
info.maxval[0], info.res[0],
|
info.maxval[0], info.res[0],
|
||||||
info.minres[0], info.maxres[0]);
|
info.minres[0], info.maxres[0]);
|
||||||
} else if (info.numAbsAxes) {
|
} else if (info.numAbsAxes) {
|
||||||
InitValuatorClassDeviceStruct(pDevice, info.numAbsAxes,
|
InitValuatorClassDeviceStruct(pDevice, info.numAbsAxes,
|
||||||
|
axis_labels,
|
||||||
dmxPointerGetMotionBufferSize(),
|
dmxPointerGetMotionBufferSize(),
|
||||||
Absolute);
|
Absolute);
|
||||||
for (i = 0; i < info.numAbsAxes; i++)
|
for (i = 0; i < info.numAbsAxes; i++)
|
||||||
InitValuatorAxisStruct(pDevice, i+info.numRelAxes,
|
InitValuatorAxisStruct(pDevice, i+info.numRelAxes,
|
||||||
|
axis_labels[i + info.numRelAxes],
|
||||||
info.minval[i+1], info.maxval[i+1],
|
info.minval[i+1], info.maxval[i+1],
|
||||||
info.res[i+1], info.minres[i+1],
|
info.res[i+1], info.minres[i+1],
|
||||||
info.maxres[i+1]);
|
info.maxres[i+1]);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user