X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fdevices%2FCECBusDevice.cpp;h=bfb546f8badd6303ffeb2ceae5fa9085e10755ce;hb=75273cc6ad40f8829711adfc35c96253003dad76;hp=4234ec72254d0ee436e352588f3c6c5c1f797488;hpb=4ba7bfae1e415640550a7515b5b8a910c893a208;p=deb_libcec.git diff --git a/src/lib/devices/CECBusDevice.cpp b/src/lib/devices/CECBusDevice.cpp index 4234ec7..bfb546f 100644 --- a/src/lib/devices/CECBusDevice.cpp +++ b/src/lib/devices/CECBusDevice.cpp @@ -613,6 +613,17 @@ void CCECBusDevice::SetPowerStatus(const cec_power_status powerStatus) } } +void CCECBusDevice::ImageViewOnSent(void) +{ + CLockObject lock(m_mutex); + if (m_powerStatus != CEC_POWER_STATUS_ON && m_powerStatus != CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON) + { + m_iLastPowerStateUpdate = GetTimeMs(); + LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s (%X): power status changed from '%s' to '%s'", GetLogicalAddressName(), m_iLogicalAddress, ToString(m_powerStatus), ToString(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON)); + m_powerStatus = CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON; + } +} + bool CCECBusDevice::RequestPowerStatus(const cec_logical_address initiator, bool bWaitForResponse /* = true */) { bool bReturn(false); @@ -1052,6 +1063,14 @@ bool CCECBusDevice::TransmitImageViewOn(void) MarkBusy(); bImageViewOnSent = m_handler->TransmitImageViewOn(m_iLogicalAddress, CECDEVICE_TV); MarkReady(); + + if (bImageViewOnSent) + { + CCECBusDevice* tv = m_processor->GetDevice(CECDEVICE_TV); + if (tv) + tv->ImageViewOnSent(); + } + return bImageViewOnSent; }