From: Lars Op den Kamp Date: Thu, 8 Mar 2012 17:30:49 +0000 (+0100) Subject: cec: try to set the other settings of one fails. bugzid: 543 X-Git-Tag: upstream/2.2.0~1^2~31^2~92 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=ffdfabf02d6647c1745e3c92e7514c776d84c468;p=deb_libcec.git cec: try to set the other settings of one fails. bugzid: 543 --- diff --git a/src/lib/adapter/USBCECAdapterCommunication.cpp b/src/lib/adapter/USBCECAdapterCommunication.cpp index 4e6189c..4f477b9 100644 --- a/src/lib/adapter/USBCECAdapterCommunication.cpp +++ b/src/lib/adapter/USBCECAdapterCommunication.cpp @@ -574,13 +574,16 @@ bool CUSBCECAdapterCommunication::PersistConfiguration(libcec_configuration *con if (m_iFirmwareVersion < 2) return false; - return SetAutoEnabled(true) && - SetDefaultLogicalAddress(configuration->logicalAddresses.primary) && - SetLogicalAddressMask(configuration->logicalAddresses.AckMask()) && - SetPhysicalAddress(configuration->iPhysicalAddress) && - SetCECVersion(CEC_VERSION_1_3A) && - SetOSDName(configuration->strDeviceName) && - WriteEEPROM(); + bool bReturn(true); + bReturn &= SetAutoEnabled(true); + bReturn &= SetDefaultLogicalAddress(configuration->logicalAddresses.primary); + bReturn &= SetLogicalAddressMask(configuration->logicalAddresses.AckMask()); + bReturn &= SetPhysicalAddress(configuration->iPhysicalAddress); + bReturn &= SetCECVersion(CEC_VERSION_1_3A); + bReturn &= SetOSDName(configuration->strDeviceName); + if (bReturn) + bReturn = WriteEEPROM(); + return bReturn; } bool CUSBCECAdapterCommunication::SetControlledMode(bool controlled)