From d1ab114f2ec067abbaa367ccd0ec45156e2f89a6 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Tue, 20 Dec 2011 22:54:19 +0100 Subject: [PATCH] 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 --- src/lib/implementations/CECCommandHandler.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } } -- 2.34.1