X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fdevices%2FCECBusDevice.cpp;h=600356598ee425eacceca4749482fef66952c5ab;hb=38bdb94305cac92a7ac8ea31e2c1533dc17fb8dc;hp=c3e45ec12d068cf5e000717f3643b4ef70444010;hpb=1162157634cc45c1b30b3ae7b7c049e717d06375;p=deb_libcec.git diff --git a/src/lib/devices/CECBusDevice.cpp b/src/lib/devices/CECBusDevice.cpp index c3e45ec..6003565 100644 --- a/src/lib/devices/CECBusDevice.cpp +++ b/src/lib/devices/CECBusDevice.cpp @@ -242,25 +242,6 @@ void CCECBusDevice::SetMenuLanguage(const cec_menu_language &language) } } -bool CCECBusDevice::SetOSDString(cec_display_control duration, const char *strMessage) -{ - CStdString strLog; - strLog.Format("<< display message '%s'", strMessage); - AddLog(CEC_LOG_NOTICE, strLog.c_str()); - - cec_command command; - cec_command::format(command, GetMyLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_SET_OSD_STRING); - command.parameters.push_back((uint8_t)duration); - - unsigned int iLen = strlen(strMessage); - if (iLen > 13) iLen = 13; - - for (unsigned int iPtr = 0; iPtr < iLen; iPtr++) - command.parameters.push_back(strMessage[iPtr]); - - return m_processor->Transmit(command); -} - void CCECBusDevice::SetPhysicalAddress(uint16_t iNewAddress, uint16_t iOldAddress /* = 0 */) { if (iNewAddress > 0) @@ -427,6 +408,25 @@ bool CCECBusDevice::TransmitOSDName(cec_logical_address dest) return m_processor->Transmit(command); } +bool CCECBusDevice::TransmitOSDString(cec_logical_address dest, cec_display_control duration, const char *strMessage) +{ + CStdString strLog; + strLog.Format("<< display message '%s'", strMessage); + AddLog(CEC_LOG_NOTICE, strLog.c_str()); + + cec_command command; + cec_command::format(command, m_iLogicalAddress, dest, CEC_OPCODE_SET_OSD_STRING); + command.parameters.push_back((uint8_t)duration); + + unsigned int iLen = strlen(strMessage); + if (iLen > 13) iLen = 13; + + for (unsigned int iPtr = 0; iPtr < iLen; iPtr++) + command.parameters.push_back(strMessage[iPtr]); + + return m_processor->Transmit(command); +} + bool CCECBusDevice::TransmitPhysicalAddress(void) { CStdString strLog;