From 797dd7c45722f8faa92a82608b7a646dfc49fe6b Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Sun, 4 Dec 2011 03:16:57 +0100 Subject: [PATCH] cec: fix simplink reconnect --- src/lib/implementations/SLCommandHandler.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/implementations/SLCommandHandler.cpp b/src/lib/implementations/SLCommandHandler.cpp index 2270d16..d7bfb5b 100644 --- a/src/lib/implementations/SLCommandHandler.cpp +++ b/src/lib/implementations/SLCommandHandler.cpp @@ -58,9 +58,16 @@ bool CSLCommandHandler::HandleVendorCommand(const cec_command &command) TransmitLGVendorId(command.destination, command.initiator); return true; } - else if (command.parameters.size >= 1 && + else if (command.parameters.size == 2 && command.parameters[0] == 0x04) { + /* enable SL */ + cec_command response; + cec_command::Format(response, command.destination, command.initiator, CEC_OPCODE_VENDOR_COMMAND, m_busDevice->GetTransmitTimeout()); + response.PushBack(0x05); + response.PushBack(command.parameters[1]); + m_busDevice->GetProcessor()->Transmit(response); + CCECBusDevice *primary = m_busDevice->GetProcessor()->m_busDevices[m_busDevice->GetProcessor()->GetLogicalAddresses().primary]; if (primary->GetType() == CEC_DEVICE_TYPE_PLAYBACK_DEVICE || primary->GetType() == CEC_DEVICE_TYPE_RECORDING_DEVICE) { -- 2.34.1