/* get the vendor id from the TV, so we are using the correct handler */
m_busDevices[CECDEVICE_TV]->GetVendorId();
+ ReplaceHandlers();
bReturn = SetHDMIPort(m_iBaseDevice, m_iHDMIPort, true);
}
void CCECProcessor::ReplaceHandlers(void)
{
for (uint8_t iPtr = 0; iPtr <= CECDEVICE_PLAYBACKDEVICE3; iPtr++)
- m_busDevices[iPtr]->ReplaceHandler(true);
+ m_busDevices[iPtr]->ReplaceHandler(false);
}
void *CCECProcessor::Process(void)
while (!IsStopped())
{
- ReplaceHandlers();
-
command.Clear();
msg.clear();
bool CCECProcessor::SetHDMIPort(cec_logical_address iBaseDevice, uint8_t iPort, bool bForce /* = false */)
{
bool bReturn(false);
- CLockObject lock(&m_mutex);
+ {
+ CLockObject lock(&m_mutex);
- m_iBaseDevice = iBaseDevice;
- m_iHDMIPort = iPort;
- if (!m_bStarted && !bForce)
- return true;
+ m_iBaseDevice = iBaseDevice;
+ m_iHDMIPort = iPort;
+ if (!m_bStarted && !bForce)
+ return true;
+ }
CStdString strLog;
strLog.Format("setting HDMI port to %d on device %s (%d)", iPort, ToString(iBaseDevice), (int)iBaseDevice);