X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FCECProcessor.cpp;h=3aef595c50f7e5e8bd77db95763d0926d8515813;hb=f2198ab5e1803596b15174da8dce022bae5d8282;hp=1ca2dfe7fc180dead8827b525ef6379e23e3b569;hpb=1a6c6a8ddde4f5db0f687c2fa236354ddb019c9c;p=deb_libcec.git diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index 1ca2dfe..3aef595 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -161,7 +161,7 @@ bool CCECProcessor::TryLogicalAddress(cec_logical_address address, unsigned int m_logicalAddresses.set(address); // TODO - m_busDevices[address]->SetPhysicalAddress(CEC_DEFAULT_PHYSICAL_ADDRESS + (iIndex * 0x100)); + m_busDevices[address]->SetPhysicalAddress((uint16_t)CEC_DEFAULT_PHYSICAL_ADDRESS + ((uint16_t)iIndex * 0x100)); return true; } @@ -268,7 +268,7 @@ void *CCECProcessor::Process(void) else if (m_communication->IsOpen() && m_communication->Read(msg, 50)) { m_controller->AddLog(msg.is_error() ? CEC_LOG_WARNING : CEC_LOG_DEBUG, msg.ToString()); - if ((bParseFrame = (ParseMessage(msg) && !IsStopped()))) + if ((bParseFrame = (ParseMessage(msg) && !IsStopped())) == true) command = m_currentframe; } } @@ -301,7 +301,7 @@ bool CCECProcessor::SetActiveSource(cec_device_type type /* = CEC_DEVICE_TYPE_RE if (type != CEC_DEVICE_TYPE_RESERVED) { - for (unsigned int iPtr = 0; iPtr < 16; iPtr++) + for (uint8_t iPtr = 0; iPtr < 16; iPtr++) { if (m_logicalAddresses[iPtr] && m_busDevices[iPtr]->m_type == type) { @@ -330,6 +330,7 @@ bool CCECProcessor::SetStreamPath(uint16_t iStreamPath) m_busDevices[iPtr]->m_bActiveSource = false; device->m_bActiveSource = true; + device->m_powerStatus = CEC_POWER_STATUS_ON; if (m_logicalAddresses.isset(device->m_iLogicalAddress)) bReturn = device->TransmitActiveSource();