X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fadapter%2FPulse-Eight%2FUSBCECAdapterCommands.cpp;h=f70c8ef76f80582955fd9222e85552241824a2b3;hb=8f69060da89a711b1a45bc7d5958a3436b71ac4a;hp=944806828ea5553c95d6549c8f006ee22cd00f58;hpb=431ceea8985bff73bfd349ae08823c9e7cc72594;p=deb_libcec.git diff --git a/src/lib/adapter/Pulse-Eight/USBCECAdapterCommands.cpp b/src/lib/adapter/Pulse-Eight/USBCECAdapterCommands.cpp index 9448068..f70c8ef 100644 --- a/src/lib/adapter/Pulse-Eight/USBCECAdapterCommands.cpp +++ b/src/lib/adapter/Pulse-Eight/USBCECAdapterCommands.cpp @@ -1,7 +1,7 @@ /* * This file is part of the libCEC(R) library. * - * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited. All rights reserved. + * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved. * libCEC(R) is an original work, containing original code. * * libCEC(R) is a trademark of Pulse-Eight Limited. @@ -592,6 +592,19 @@ bool CUSBCECAdapterCommands::SetAckMask(uint16_t iMask) return bReturn; } +void CUSBCECAdapterCommands::SetActiveSource(bool bSetTo, bool bClientUnregistered) +{ + if (bClientUnregistered) return; + if (m_persistedConfiguration.iFirmwareVersion >= 3) + { + LIB_CEC->AddLog(CEC_LOG_DEBUG, "marking the adapter as %s source", bSetTo ? "active" : "inactive"); + CCECAdapterMessage params; + params.PushEscaped(bSetTo ? 1 : 0); + CCECAdapterMessage *message = m_comm->SendCommand(MSGCODE_SET_ACTIVE_SOURCE, params); + delete message; + } +} + bool CUSBCECAdapterCommands::StartBootloader(void) { LIB_CEC->AddLog(CEC_LOG_DEBUG, "starting the bootloader");