X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Fimplementations%2FSLCommandHandler.cpp;h=c9fd65d3a544a762ed0060ff2db1c810f77f82d9;hb=94e9a2afff9e6bfc18fa401fc9824432475a5927;hp=31376e59b1c12cbc66c1b34d86c7e80285db1d6b;hpb=3e61b35032f69fb93869796e2f985de8cff2ae33;p=deb_libcec.git diff --git a/src/lib/implementations/SLCommandHandler.cpp b/src/lib/implementations/SLCommandHandler.cpp index 31376e5..c9fd65d 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; @@ -50,14 +48,14 @@ using namespace CEC; CSLCommandHandler::CSLCommandHandler(CCECBusDevice *busDevice) : CCECCommandHandler(busDevice), - m_bAwaitingReceiveFailed(false), 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()) + if (primary && m_busDevice->GetLogicalAddress() != primary->GetLogicalAddress()) primary->SetVendorId(CEC_VENDOR_LG); SetLGDeckStatus(); @@ -72,24 +70,6 @@ CSLCommandHandler::CSLCommandHandler(CCECBusDevice *busDevice) : m_busDevice->SetMenuLanguage(lang); } - -void CSLCommandHandler::HandlePoll(const cec_logical_address iInitiator, const cec_logical_address iDestination) -{ - CCECCommandHandler::HandlePoll(iInitiator, iDestination); - m_bAwaitingReceiveFailed = true; -} - -bool CSLCommandHandler::HandleReceiveFailed(void) -{ - if (m_bAwaitingReceiveFailed) - { - m_bAwaitingReceiveFailed = false; - return false; - } - - return true; -} - bool CSLCommandHandler::InitHandler(void) { if (m_bHandlerInited) @@ -140,7 +120,7 @@ bool CSLCommandHandler::HandleFeatureAbort(const cec_command &command) bool CSLCommandHandler::HandleGivePhysicalAddress(const cec_command &command) { - if (m_processor->IsStarted() && m_busDevice->MyLogicalAddressContains(command.destination)) + if (m_processor->IsRunning() && m_busDevice->MyLogicalAddressContains(command.destination)) { CCECBusDevice *device = GetDevice(command.destination); if (device)