diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp index e90349678649c..650df18463e07 100644 --- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp @@ -705,6 +705,7 @@ int CPeripheralCecAdapter::CecAlert(void *cbParam, const libcec_alert alert, con iAlertString = 36027; break; case CEC_ALERT_CONNECTION_LOST: + bReopenConnection = true; iAlertString = 36030; break; #if defined(CEC_ALERT_PERMISSION_ERROR) @@ -1675,12 +1676,17 @@ void CPeripheralCecAdapter::ProcessStandbyDevices(void) CSingleLock lock(m_critSection); bStandby = m_bStandbyPending; m_bStandbyPending = false; + if (bStandby) + m_bGoingToStandby = true; } if (bStandby) { - m_cecAdapter->StandbyDevices(CECDEVICE_BROADCAST); - if (m_configuration.bSendInactiveSource == 1) + if (!m_configuration.powerOffDevices.IsEmpty()) + { + m_cecAdapter->StandbyDevices(CECDEVICE_BROADCAST); + } + else if (m_configuration.bSendInactiveSource == 1) { CLog::Log(LOGDEBUG, "%s - sending inactive source commands", __FUNCTION__); m_cecAdapter->SetInactiveView();