philips TVs sometimes keep sending key presses without key releases
authorLars Op den Kamp <lars@opdenkamp.eu>
Wed, 14 Nov 2012 09:39:22 +0000 (10:39 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Wed, 14 Nov 2012 09:39:22 +0000 (10:39 +0100)
src/lib/implementations/PHCommandHandler.cpp

index 0d9f010800b5775fb905f717cb1109453eb9b6e6..a4e7129d44b22780b3523c19abb8978cd4ab8eb9 100644 (file)
@@ -129,9 +129,8 @@ bool CPHCommandHandler::ActivateSource(bool bTransmitDelayedCommandsOnly /* = fa
 
 int CPHCommandHandler::HandleUserControlPressed(const cec_command& command)
 {
-  // tv keeps sending these until a button is pressed
-  if (command.parameters[0] == CEC_USER_CONTROL_CODE_DISPLAY_INFORMATION &&
-      m_iLastKeyCode == CEC_USER_CONTROL_CODE_DISPLAY_INFORMATION)
+  // TV sometimes keeps sending key presses without releases
+  if (m_iLastKeyCode == command.parameters[0])
     return COMMAND_HANDLED;
 
   m_iLastKeyCode = command.parameters[0];