SetAckMask(0x1 << address);
if (!m_busDevices[address]->PollDevice(address))
{
-
strLog.Format("using logical address '%s'", strLabel);
AddLog(CEC_LOG_NOTICE, strLog);
+
+ /* only set our OSD name for the primary device */
+ if (m_logicalAddresses.empty())
+ m_busDevices[address]->m_strDeviceName = m_strDeviceName;
m_logicalAddresses.set(address);
// TODO
bool CCECBusDevice::ReportOSDName(cec_logical_address dest)
{
- const char *osdname = m_processor->GetDeviceName().c_str();
CStdString strLog;
- strLog.Format("<< reporting OSD name as %s", osdname);
+ strLog.Format("<< reporting OSD name as %s", m_strDeviceName.c_str());
AddLog(CEC_LOG_NOTICE, strLog.c_str());
cec_command command;
cec_command::format(command, m_iLogicalAddress, dest, CEC_OPCODE_SET_OSD_NAME);
- for (unsigned int iPtr = 0; iPtr < strlen(osdname); iPtr++)
- command.parameters.push_back(osdname[iPtr]);
+ for (unsigned int iPtr = 0; iPtr < m_strDeviceName.length(); iPtr++)
+ command.parameters.push_back(m_strDeviceName.at(iPtr));
return m_processor->Transmit(command);
}
class CCECBusDevice
{
+ friend class CCECProcessor;
+
public:
CCECBusDevice(CCECProcessor *processor, cec_logical_address address, uint16_t iPhysicalAddress = 0);
virtual ~CCECBusDevice(void);