cec: allow to override the TV vendor id via the initial configuration
[deb_libcec.git] / src / lib / CECProcessor.cpp
index ebd17729f4e0355f3ad77ab8f2a30a3a85f70188..f4e485ac3b6da0a7e3c01462780c037fc744c290 100644 (file)
@@ -64,6 +64,11 @@ CCECProcessor::CCECProcessor(CLibCEC *controller, const libcec_configuration *co
 {
   m_logicalAddresses.Clear();
   CreateBusDevices();
+  if (configuration->tvVendor != CEC_VENDOR_UNKNOWN)
+  {
+    m_busDevices[CECDEVICE_TV]->SetVendorId((uint64_t)configuration->tvVendor);
+    m_busDevices[CECDEVICE_TV]->ReplaceHandler(false);
+  }
 }
 
 CCECProcessor::CCECProcessor(CLibCEC *controller, const char *strDeviceName, const cec_device_type_list &types, uint16_t iPhysicalAddress, cec_client_version clientVersion) :