From: Victor Luft Date: Tue, 24 Feb 2015 02:27:33 +0000 (-0800) Subject: clear buffers on Consumer/System Control release X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=595319c511e0a852219f8b174a259145f581e1b5;hp=a3b80b0f2ac852a8940072bc4161261f20fa84fe;p=kiibohd-controller.git clear buffers on Consumer/System Control release fixes #15 --- diff --git a/Output/pjrcUSB/output_com.c b/Output/pjrcUSB/output_com.c index f5111e0..eb25b83 100644 --- a/Output/pjrcUSB/output_com.c +++ b/Output/pjrcUSB/output_com.c @@ -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];