X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FCECProcessor.cpp;h=034c7e660c56de66d1702781d5f636b3716a71fe;hb=42d28d15d07f893b491051970ade1bd56bb596eb;hp=0012a53d289f52591cb398f4c1bf1d152a68a120;hpb=34fe491f051387fa870da9459ce53892f7bb03ab;p=deb_libcec.git diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index 0012a53..034c7e6 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -645,6 +645,9 @@ bool CCECProcessor::RegisterClient(CCECClient *client) return false; } + // ensure that we know the vendor id of the TV + GetTV()->GetVendorId(CECDEVICE_UNREGISTERED); + // unregister the client first if it's already been marked as registered if (client->IsRegistered()) UnregisterClient(client); @@ -720,6 +723,14 @@ bool CCECProcessor::RegisterClient(CCECClient *client) client->Alert(CEC_ALERT_SERVICE_DEVICE, param); } + // ensure that the command handler for the TV is initialised + if (bReturn) + { + CCECCommandHandler *handler = GetTV()->GetHandler(); + if (handler) + handler->InitHandler(); + } + return bReturn; }