MCPcopy Create free account
hub / github.com/Pulse-Eight/libcec / SetDeviceTypes

Method SetDeviceTypes

src/libcec/CECClient.cpp:1410–1429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1408}
1409
1410bool CCECClient::SetDeviceTypes(const cec_device_type_list &deviceTypes)
1411{
1412 bool bNeedReinit(false);
1413
1414 {
1415 CLockObject lock(m_mutex);
1416 bNeedReinit = m_processor && m_processor->CECInitialised() &&
1417 (m_configuration.deviceTypes != deviceTypes);
1418 m_configuration.deviceTypes = deviceTypes;
1419 }
1420
1421
1422 if (bNeedReinit)
1423 {
1424 LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s - using primary device type '%s'", __FUNCTION__, ToString(deviceTypes[0]));
1425 SaveConfiguration(m_configuration);
1426 }
1427
1428 return bNeedReinit;
1429}
1430
1431cec_device_type_list CCECClient::GetDeviceTypes(void)
1432{

Callers

nothing calls this directly

Calls 3

ToStringFunction · 0.85
CECInitialisedMethod · 0.80
AddLogMethod · 0.45

Tested by

no test coverage detected