CCECClient *client = device->GetClient();
if (client)
- client->AddKey();
-
- if (command.parameters[0] <= CEC_USER_CONTROL_CODE_MAX)
client->SetCurrentButton((cec_user_control_code) command.parameters[0]);
if (command.parameters[0] == CEC_USER_CONTROL_CODE_POWER ||
VendorPreActivateSourceHook();
// power on the TV
- bool bActiveSourceFailed(false);
- if (m_processor->GetDevice(CECDEVICE_TV)->GetPowerStatus(m_busDevice->GetLogicalAddress()) != CEC_POWER_STATUS_ON)
- bActiveSourceFailed = !m_busDevice->TransmitImageViewOn();
+ bool bActiveSourceFailed = !m_busDevice->TransmitImageViewOn();
// check if we're allowed to switch sources
bool bSourceSwitchAllowed = SourceSwitchAllowed();
if (bActiveSourceFailed || !bSourceSwitchAllowed)
{
LIB_CEC->AddLog(CEC_LOG_DEBUG, "failed to make '%s' the active source. will retry later", m_busDevice->GetLogicalAddressName());
+ CLockObject lock(m_mutex);
+ if (m_iActiveSourcePending == 0)
+ m_iActiveSourcePending = GetTimeMs() + (int64_t)CEC_ACTIVE_SOURCE_SWITCH_RETRY_TIME_MS;
return false;
}
else