+ if (command.parameters.size == 2)
+ {
+ uint16_t iAddress = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]);
+ CCECBusDevice *device = m_processor->GetDeviceByPhysicalAddress(iAddress);
+ if (device)
+ device->MarkAsActiveSource();
+
+ {
+ CLockObject lock(m_SLMutex);
+ m_bActiveSourceSent = false;
+ }
+
+ return COMMAND_HANDLED;
+ }
+
+ return CEC_ABORT_REASON_INVALID_OPERAND;
+
+}
+
+int CSLCommandHandler::HandleDeviceVendorId(const cec_command &command)
+{
+ SetVendorId(command);
+
+ if (!SLInitialised() && command.initiator == CECDEVICE_TV)
+ {
+ CCECBusDevice *destination = m_processor->GetDevice(command.destination);
+ if (destination && (destination->GetLogicalAddress() == CECDEVICE_BROADCAST || destination->IsHandledByLibCEC()))
+ {
+ cec_logical_address initiator = destination->GetLogicalAddress();
+ if (initiator == CECDEVICE_BROADCAST)
+ initiator = m_processor->GetPrimaryDevice()->GetLogicalAddress();
+
+ cec_command response;
+ cec_command::Format(response, initiator, command.initiator, CEC_OPCODE_FEATURE_ABORT);
+ Transmit(response, false, true);
+ return COMMAND_HANDLED;
+ }
+ }
+
+ return CCECCommandHandler::HandleDeviceVendorId(command);
+}
+
+int CSLCommandHandler::HandleVendorCommand(const cec_command &command)
+{
+ if (!m_processor->IsHandledByLibCEC(command.destination))
+ return true;
+