aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Op den Kamp <lars@opdenkamp.eu>2012-12-06 11:31:10 +0100
committerLars Op den Kamp <lars@opdenkamp.eu>2012-12-06 22:38:11 +0100
commit7a2366374a9f0273e290cc5b1abd14e86bab5270 (patch)
tree8bc7bef6b77997d0daae99303033f38f623b22c2
parenta6821e5825c09de07784d37b16cc3d254825e629 (diff)
[cec] don't send explicit wakeup commands when only the TV is marked to be powered up and 'activate source' is enabled. fixes dupe 'image view on' commands
-rw-r--r--xbmc/peripherals/devices/PeripheralCecAdapter.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
index 9762da19ae..366bca3cf0 100644
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
@@ -379,13 +379,12 @@ bool CPeripheralCecAdapter::OpenConnection(void)
libcec_configuration config;
if (m_cecAdapter->GetCurrentConfiguration(&config))
{
- // send wakeup commands
- if (!config.wakeDevices.IsEmpty())
- m_cecAdapter->PowerOnDevices(CECDEVICE_BROADCAST);
-
- // make xbmc the active source
- if (config.bActivateSource == 1)
- m_cecAdapter->SetActiveSource();
+ // wake devices
+ for (uint8_t iDevice = CECDEVICE_TV; iDevice < CECDEVICE_BROADCAST; iDevice++)
+ {
+ if ((config.bActivateSource == 0 || iDevice != CECDEVICE_TV) && config.wakeDevices.IsSet((cec_logical_address)iDevice))
+ m_cecAdapter->PowerOnDevices((cec_logical_address)iDevice);
+ }
// update the local configuration
CSingleLock lock(m_critSection);