diff options
author | Lars Op den Kamp <lars@opdenkamp.eu> | 2012-12-06 02:33:11 +0100 |
---|---|---|
committer | Lars Op den Kamp <lars@opdenkamp.eu> | 2012-12-06 02:33:11 +0100 |
commit | 879a7b9074b57aa448a027f2eadf7731d3d34fac (patch) | |
tree | 3c1712a5a5a7576b4df44ca7df666ed0ec0b4122 | |
parent | abcb3f86843ed098822c30d1dab17e378aa0b946 (diff) |
[cec] fixed - don't send an active source message for the next playlist item for players that don't send OnStop before OnPlay
-rw-r--r-- | xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 4 | ||||
-rw-r--r-- | xbmc/peripherals/devices/PeripheralCecAdapter.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp index b26ef3809d..9762da19ae 100644 --- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp @@ -131,6 +131,7 @@ void CPeripheralCecAdapter::ResetMembers(void) m_bActiveSourcePending = false; m_bStandbyPending = false; m_bActiveSourceBeforeStandby = false; + m_bOnPlayReceived = false; m_currentButton.iButton = 0; m_currentButton.iDuration = 0; @@ -204,6 +205,7 @@ void CPeripheralCecAdapter::Announce(AnnouncementFlag flag, const char *sender, { CSingleLock lock(m_critSection); m_preventActivateSourceOnPlay = CDateTime::GetCurrentDateTime(); + m_bOnPlayReceived = false; } else if (flag == Player && !strcmp(sender, "xbmc") && !strcmp(message, "OnPlay")) { @@ -212,7 +214,9 @@ void CPeripheralCecAdapter::Announce(AnnouncementFlag flag, const char *sender, { CSingleLock lock(m_critSection); bActivateSource = (m_configuration.bActivateSource && + !m_bOnPlayReceived && (!m_preventActivateSourceOnPlay.IsValid() || CDateTime::GetCurrentDateTime() - m_preventActivateSourceOnPlay > CDateTimeSpan(0, 0, 0, CEC_SUPPRESS_ACTIVATE_SOURCE_AFTER_ON_STOP))); + m_bOnPlayReceived = true; } if (bActivateSource) ActivateSource(); diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.h b/xbmc/peripherals/devices/PeripheralCecAdapter.h index 03e213adc0..20e5744636 100644 --- a/xbmc/peripherals/devices/PeripheralCecAdapter.h +++ b/xbmc/peripherals/devices/PeripheralCecAdapter.h @@ -169,6 +169,7 @@ namespace PERIPHERALS bool m_bStandbyPending; CDateTime m_preventActivateSourceOnPlay; bool m_bActiveSourceBeforeStandby; + bool m_bOnPlayReceived; }; class CPeripheralCecAdapterUpdateThread : public CThread |