From: Lars Op den Kamp Date: Wed, 14 Nov 2012 09:39:22 +0000 (+0100) Subject: philips TVs sometimes keep sending key presses without key releases X-Git-Tag: upstream/2.2.0~1^2~12^2~18 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=ec0cc2ea24b8c4757e0d9508646e75d05d469a79;p=deb_libcec.git philips TVs sometimes keep sending key presses without key releases --- diff --git a/src/lib/implementations/PHCommandHandler.cpp b/src/lib/implementations/PHCommandHandler.cpp index 0d9f010..a4e7129 100644 --- a/src/lib/implementations/PHCommandHandler.cpp +++ b/src/lib/implementations/PHCommandHandler.cpp @@ -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];