m_currentButton.iButton = 0;
m_currentButton.iDuration = 0;
- m_screensaverLastActivated.SetValid(false);
+ m_standbySent.SetValid(false);
m_configuration.Clear();
}
// Don't put devices to standby if application is currently playing
if ((!g_application.m_pPlayer->IsPlaying() && !g_application.m_pPlayer->IsPaused()) && m_configuration.bPowerOffScreensaver == 1)
{
- m_screensaverLastActivated = CDateTime::GetCurrentDateTime();
// only power off when we're the active source
if (m_cecAdapter->IsLibCECActiveSource())
StandbyDevices();
if (!m_configuration.powerOffDevices.IsEmpty())
{
CLog::Log(LOGDEBUG, "%s - sending standby commands", __FUNCTION__);
+ m_standbySent = CDateTime::GetCurrentDateTime();
m_cecAdapter->StandbyDevices();
}
else if (m_configuration.bSendInactiveSource == 1)
/* a device was put in standby mode */
if (command.initiator == CECDEVICE_TV &&
(adapter->m_configuration.bPowerOffOnStandby == 1 || adapter->m_configuration.bShutdownOnStandby == 1) &&
- (!adapter->m_screensaverLastActivated.IsValid() || CDateTime::GetCurrentDateTime() - adapter->m_screensaverLastActivated > CDateTimeSpan(0, 0, 0, SCREENSAVER_TIMEOUT)))
+ (!adapter->m_standbySent.IsValid() || CDateTime::GetCurrentDateTime() - adapter->m_standbySent > CDateTimeSpan(0, 0, 0, SCREENSAVER_TIMEOUT)))
{
adapter->m_bStarted = false;
if (adapter->m_configuration.bPowerOffOnStandby == 1)
{
if (!m_configuration.powerOffDevices.IsEmpty())
{
+ m_standbySent = CDateTime::GetCurrentDateTime();
m_cecAdapter->StandbyDevices(CECDEVICE_BROADCAST);
}
else if (m_configuration.bSendInactiveSource == 1)
if (m_cecAdapter->IsLibCECActiveSource() && (mode == STATE_SWITCH_TOGGLE || mode == STATE_STANDBY))
{
CLog::Log(LOGDEBUG, "%s - putting CEC device on standby...", __FUNCTION__);
- m_screensaverLastActivated = CDateTime::GetCurrentDateTime();
StandbyDevices();
return false;
}