summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/dmx/dmxinput.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/hw/dmx/dmxinput.c b/hw/dmx/dmxinput.c
index ff76f24b4..6066f1cb0 100644
--- a/hw/dmx/dmxinput.c
+++ b/hw/dmx/dmxinput.c
@@ -1780,13 +1780,21 @@ dmxInputEnable (DMXInputInfo *dmxInput)
int
dmxInputDisable (DMXInputInfo *dmxInput)
{
- int i;
+ char state[32];
+ int i;
+
+ memset (state, 0, sizeof (state));
for (i = 0; i < dmxInput->numDevs; i++)
{
dmxLogInput (dmxInput, "Disable device id %d: %s\n",
dmxInput->devs[i]->id, dmxInput->devs[i]->name);
+ if (dmxInput->devs[i]->key)
+ dmxUpdateKeyState (dmxInput->devs[i], state);
+ else if (dmxInput->devs[i]->button)
+ dmxUpdateButtonState (dmxInput->devs[i], state);
+
DisableDevice (dmxInput->devs[i]);
}