From: Lars Op den Kamp Date: Tue, 20 Dec 2011 21:54:19 +0000 (+0100) Subject: cec: don't send the power up/down keypress to listeners when in the initial device... X-Git-Tag: upstream/2.2.0~1^2~43^2~35 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=d1ab114f2ec067abbaa367ccd0ec45156e2f89a6;p=deb_libcec.git cec: don't send the power up/down keypress to listeners when in the initial device state (powered off). fixes unexpected shutdown in XBMC when connecting to the CEC adapter --- diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index b43d2b0..bdabcb7 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -577,7 +577,10 @@ bool CCECCommandHandler::HandleUserControlPressed(const cec_command &command) } } } - m_processor->SetCurrentButton((cec_user_control_code) command.parameters[0]); + else + { + m_processor->SetCurrentButton((cec_user_control_code) command.parameters[0]); + } return true; } }