AddLog(CEC_LOG_WARNING, "command buffer is full");
}
+void CLibCEC::Alert(const libcec_alert type, const libcec_parameter ¶m)
+{
+ CLibCEC *instance = CLibCEC::GetInstance();
+ if (!instance)
+ return;
+ CLockObject lock(instance->m_mutex);
+
+ libcec_configuration config;
+ instance->GetCurrentConfiguration(&config);
+
+ if (instance->m_callbacks &&
+ config.clientVersion >= CEC_CLIENT_VERSION_1_6_0 &&
+ instance->m_cec->IsInitialised() &&
+ instance->m_callbacks->CBCecAlert != NULL)
+ instance->m_callbacks->CBCecAlert(instance->m_cbParam, type, param);
+
+ if (type == CEC_ALERT_CONNECTION_LOST)
+ instance->Close();
+}
+
void CLibCEC::CheckKeypressTimeout(void)
{
if (m_iCurrentButton != CEC_USER_CONTROL_CODE_UNKNOWN && GetTimeMs() - m_buttontime > CEC_BUTTON_TIMEOUT)
bool CLibCEC::GetCurrentConfiguration(libcec_configuration *configuration)
{
- return m_cec->IsInitialised() && m_cec->GetCurrentConfiguration(configuration);
+ return m_cec->GetCurrentConfiguration(configuration);
}
bool CLibCEC::SetConfiguration(const libcec_configuration *configuration)