X-Git-Url: https://git.piment-noir.org/?p=deb_libcec.git;a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FCECCommandHandler.cpp;h=12e74e3e31bfded1ffe5406d46c806b43a607739;hp=b742f49898001f437d64478d0e8b6f7593c7e4dc;hb=d9de2aae6b2f47b8e1faacc69adba7406b9d85f0;hpb=3befc9811e59359c014c33c1276f869d5b59ac09 diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index b742f49..12e74e3 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -910,12 +910,12 @@ bool CCECCommandHandler::TransmitRequestPhysicalAddress(const cec_logical_addres return Transmit(command, !bWaitForResponse, false); } -bool CCECCommandHandler::TransmitRequestPowerStatus(const cec_logical_address iInitiator, const cec_logical_address iDestination, bool bWaitForResponse /* = true */) +bool CCECCommandHandler::TransmitRequestPowerStatus(const cec_logical_address iInitiator, const cec_logical_address iDestination, bool bUpdate, bool bWaitForResponse /* = true */) { if (iDestination == CECDEVICE_TV) { int64_t now(GetTimeMs()); - if (now - m_iPowerStatusRequested < REQUEST_POWER_STATUS_TIMEOUT) + if (!bUpdate && now - m_iPowerStatusRequested < REQUEST_POWER_STATUS_TIMEOUT) return true; m_iPowerStatusRequested = now; } @@ -1207,7 +1207,7 @@ bool CCECCommandHandler::ActivateSource(bool bTransmitDelayedCommandsOnly /* = f bool bTvPresent = (tv && tv->GetStatus() == CEC_DEVICE_STATUS_PRESENT); bool bActiveSourceFailed(false); if (bTvPresent) - bActiveSourceFailed = !m_busDevice->TransmitImageViewOn(); + bActiveSourceFailed = !tv->PowerOn(m_busDevice->GetLogicalAddress()); else LIB_CEC->AddLog(CEC_LOG_DEBUG, "TV not present, not sending 'image view on'");