bool m_bReplaceHandler;
cec_menu_state m_menuState;
bool m_bActiveSource;
- uint64_t m_iLastActive;
- uint64_t m_iLastPowerStateUpdate;
+ int64_t m_iLastActive;
+ int64_t m_iLastPowerStateUpdate;
cec_version m_cecVersion;
cec_bus_device_status m_deviceStatus;
std::set<cec_opcode> m_unsupportedFeatures;
LIB_CEC->AddLog(CEC_LOG_DEBUG, "transmitting delayed activate source command");
}
-
- // clear previous pending active source command
- m_iActiveSourcePending = 0;
}
// update the power state and menu state
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);
- m_iActiveSourcePending = GetTimeMs() + (int64_t)CEC_ACTIVE_SOURCE_SWITCH_RETRY_TIME_MS;
return false;
}
+ else
+ {
+ CLockObject lock(m_mutex);
+ // clear previous pending active source command
+ m_iActiveSourcePending = 0;
+ }
// mark the handler as initialised
CLockObject lock(m_mutex);