]> git.donarmstrong.com Git - kiibohd-controller.git/commitdiff
clear buffers on Consumer/System Control release
authorVictor Luft <victor@luft.io>
Tue, 24 Feb 2015 02:27:33 +0000 (18:27 -0800)
committerVictor Luft <victor@luft.io>
Tue, 24 Feb 2015 02:29:01 +0000 (18:29 -0800)
fixes #15

Output/pjrcUSB/output_com.c

index f5111e044a78e7743e011e4a835708594433ecdf..eb25b83ba30e65a5975922c4ca705b248b553dac 100644 (file)
@@ -219,7 +219,10 @@ void Output_consCtrlSend_capability( uint8_t state, uint8_t stateType, uint8_t *
 
        // Only send keypresses if press or hold state
        if ( stateType == 0x00 && state == 0x03 ) // Release state
+       {
+               USBKeys_ConsCtrl = 0;
                return;
+       }
 
        // Set consumer control code
        USBKeys_ConsCtrl = *(uint16_t*)(&args[0]);
@@ -250,7 +253,10 @@ void Output_sysCtrlSend_capability( uint8_t state, uint8_t stateType, uint8_t *a
 
        // Only send keypresses if press or hold state
        if ( stateType == 0x00 && state == 0x03 ) // Release state
+       {
+               USBKeys_SysCtrl = 0;
                return;
+       }
 
        // Set system control code
        USBKeys_SysCtrl = args[0];