X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FSLCommandHandler.cpp;h=09fcf4ba8a70cefc6212f3da5192e5b73552f548;hb=3a590d6a4652d1c47026446dcdc44ac9852f8af3;hp=bc302aa8092bad94ee81de56682d9a48b130130a;hpb=468a141464d9b9a088df8abd35f5ebb138424155;p=deb_libcec.git diff --git a/src/lib/implementations/SLCommandHandler.cpp b/src/lib/implementations/SLCommandHandler.cpp index bc302aa..09fcf4b 100644 --- a/src/lib/implementations/SLCommandHandler.cpp +++ b/src/lib/implementations/SLCommandHandler.cpp @@ -1,7 +1,7 @@ /* * This file is part of the libCEC(R) library. * - * libCEC(R) is Copyright (C) 2011 Pulse-Eight Limited. All rights reserved. + * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited. All rights reserved. * libCEC(R) is an original work, containing original code. * * libCEC(R) is a trademark of Pulse-Eight Limited. @@ -34,8 +34,6 @@ #include "../devices/CECBusDevice.h" #include "../devices/CECPlaybackDevice.h" #include "../CECProcessor.h" -#include "../platform/timeutils.h" -#include "../platform/threads.h" using namespace CEC; @@ -54,11 +52,12 @@ CSLCommandHandler::CSLCommandHandler(CCECBusDevice *busDevice) : m_bSLEnabled(false), m_bPowerStateReset(false) { + m_vendorId = CEC_VENDOR_LG; CCECBusDevice *primary = m_processor->GetPrimaryDevice(); /* imitate LG devices */ if (m_busDevice->GetLogicalAddress() != primary->GetLogicalAddress()) - primary->SetVendorId(CEC_VENDOR_LG, false); + primary->SetVendorId(CEC_VENDOR_LG); SetLGDeckStatus(); /* LG TVs don't always reply to CEC version requests, so just set it to 1.3a */ @@ -105,6 +104,14 @@ bool CSLCommandHandler::InitHandler(void) return true; } +bool CSLCommandHandler::ActivateSource(void) +{ + CCECBusDevice *primary = m_processor->GetPrimaryDevice(); + primary->SetActiveSource(); + primary->TransmitActiveSource(); + return true; +} + bool CSLCommandHandler::HandleActiveSource(const cec_command &command) { if (command.parameters.size == 2)