diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-08-04 15:28:30 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-08-05 08:00:08 +1000 |
commit | 63155cf985ee15bf6aad95066b076ab680cf5a31 (patch) | |
tree | d7e55fda7283721ad1715d0bdcdd68eb346017fd | |
parent | af85973a0a80fb0ba82330ae3ec897f65d618003 (diff) |
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>
-rw-r--r-- | hw/dmx/input/dmxinputinit.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c index 7e3407270..ff444323c 100644 --- a/hw/dmx/input/dmxinputinit.c +++ b/hw/dmx/input/dmxinputinit.c @@ -436,7 +436,9 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what) int fd; DMXLocalInitInfo info; int i; - + Atom btn_labels[MAX_BUTTONS] = {0}; /* FIXME */ + Atom axis_labels[MAX_VALUATORS] = {0}; /* FIXME */ + if (dmxInput->detached) return Success; memset(&info, 0, sizeof(info)); @@ -457,31 +459,38 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what) dmxBell, dmxKbdCtrl); } if (info.buttonClass) { - InitButtonClassDeviceStruct(pDevice, info.numButtons, info.map); + InitButtonClassDeviceStruct(pDevice, info.numButtons, + btn_labels, info.map); } if (info.valuatorClass) { if (info.numRelAxes && dmxLocal->sendsCore) { InitValuatorClassDeviceStruct(pDevice, info.numRelAxes, + axis_labels, GetMaximumEventsNum(), Relative); for (i = 0; i < info.numRelAxes; i++) - InitValuatorAxisStruct(pDevice, i, info.minval[0], - info.maxval[0], info.res[0], + InitValuatorAxisStruct(pDevice, i, axis_labels[i], + info.minval[0], info.maxval[0], + info.res[0], info.minres[0], info.maxres[0]); } else if (info.numRelAxes) { InitValuatorClassDeviceStruct(pDevice, info.numRelAxes, + axis_labels, dmxPointerGetMotionBufferSize(), Relative); 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.minres[0], info.maxres[0]); } 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]); |