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

Method InitHandler

src/libcec/implementations/SLCommandHandler.cpp:83–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83bool CSLCommandHandler::InitHandler(void)
84{
85 if (m_bHandlerInited)
86 return true;
87 m_bHandlerInited = true;
88
89 if (m_busDevice->GetLogicalAddress() != CECDEVICE_TV)
90 return true;
91
92 CCECBusDevice *primary = m_processor->GetPrimaryDevice();
93 if (primary && primary->GetLogicalAddress() != CECDEVICE_UNREGISTERED)
94 {
95 /* imitate LG devices */
96 if (m_busDevice->GetLogicalAddress() != primary->GetLogicalAddress())
97 {
98 primary->SetVendorId(CEC_VENDOR_LG);
99 primary->ReplaceHandler(false);
100 }
101 }
102
103 return true;
104}
105
106int CSLCommandHandler::HandleVendorCommand(const cec_command &command)
107{

Callers

nothing calls this directly

Calls 4

ReplaceHandlerMethod · 0.80
GetLogicalAddressMethod · 0.45
GetPrimaryDeviceMethod · 0.45
SetVendorIdMethod · 0.45

Tested by

no test coverage detected