fixed - only set m_iCurrentButton when the duration isn't known yet. fixes duplicate...
authorLars Op den Kamp <lars@opdenkamp.eu>
Fri, 9 Nov 2012 13:39:38 +0000 (14:39 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Fri, 9 Nov 2012 13:39:38 +0000 (14:39 +0100)
src/lib/CECClient.cpp

index 004d741379b27e97eb287112c641838d7fe9b23e..dc4bbd88676f06ff6b9cf6bf9aebc87d521abae8 100644 (file)
@@ -964,8 +964,11 @@ void CCECClient::AddKey(const cec_keypress &key)
         AddKey(true);
     }
 
-    m_iCurrentButton = transmitKey.keycode;
-    m_buttontime = m_iCurrentButton == CEC_USER_CONTROL_CODE_UNKNOWN || key.duration > 0 ? 0 : GetTimeMs();
+    if (key.duration == 0)
+    {
+      m_iCurrentButton = transmitKey.keycode;
+      m_buttontime = m_iCurrentButton == CEC_USER_CONTROL_CODE_UNKNOWN || key.duration > 0 ? 0 : GetTimeMs();
+    }
   }
 
   if (key.keycode != COMBO_KEY || key.duration > 0)