X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fdevices%2FCECBusDevice.cpp;h=fa063f4e52d47209bf3b223228c939b683602652;hb=ff11274bc7372ba2780a0ca366298d5808fe4115;hp=6703e87ccd3d0be9c1b3e1cbd84552c7f4037b12;hpb=869ff0273152d0b8756a49992c6e51d1f15f2ebe;p=deb_libcec.git diff --git a/src/lib/devices/CECBusDevice.cpp b/src/lib/devices/CECBusDevice.cpp index 6703e87..fa063f4 100644 --- a/src/lib/devices/CECBusDevice.cpp +++ b/src/lib/devices/CECBusDevice.cpp @@ -186,7 +186,7 @@ bool CCECBusDevice::HandleCommand(const cec_command &command) bHandled = m_handler->HandleCommand(command); /* change status to present */ - if (bHandled && GetLogicalAddress() != CECDEVICE_BROADCAST) + if (bHandled && GetLogicalAddress() != CECDEVICE_BROADCAST && command.opcode_set == 1) { CLockObject lock(m_mutex); if (m_deviceStatus != CEC_DEVICE_STATUS_HANDLED_BY_LIBCEC) @@ -227,7 +227,9 @@ void CCECBusDevice::SetUnsupportedFeature(cec_opcode opcode) opcode == CEC_OPCODE_VENDOR_REMOTE_BUTTON_UP || opcode == CEC_OPCODE_ABORT || opcode == CEC_OPCODE_FEATURE_ABORT || - opcode == CEC_OPCODE_NONE) + opcode == CEC_OPCODE_NONE || + opcode == CEC_OPCODE_USER_CONTROL_PRESSED || + opcode == CEC_OPCODE_USER_CONTROL_RELEASE) return; { @@ -391,12 +393,13 @@ bool CCECBusDevice::TransmitSetMenuLanguage(const cec_logical_address destinatio language = m_menuLanguage; } - char lang[3]; + char lang[4]; { CLockObject lock(m_mutex); lang[0] = language.language[0]; lang[1] = language.language[1]; lang[2] = language.language[2]; + lang[3] = (char)0; } MarkBusy(); @@ -1132,21 +1135,7 @@ void CCECBusDevice::SetActiveRoute(uint16_t iRoute) CCECBusDevice* newRoute = m_processor->GetDeviceByPhysicalAddress(iRoute, true); if (newRoute && newRoute->IsHandledByLibCEC()) - { newRoute->ActivateSource(); - return; - } - - CECDEVICEVEC devices; - m_processor->GetDevices()->GetChildrenOf(devices, this); - - for (CECDEVICEVEC::iterator it = devices.begin(); it != devices.end(); it++) - { - if ((*it)->GetCurrentPhysicalAddress() == iRoute && (*it)->IsHandledByLibCEC()) - (*it)->ActivateSource(); - else if (!CCECTypeUtils::PhysicalAddressIsIncluded(iRoute, (*it)->GetCurrentPhysicalAddress())) - (*it)->MarkAsInactiveSource(); - } } void CCECBusDevice::SetStreamPath(uint16_t iNewAddress, uint16_t iOldAddress /* = CEC_INVALID_PHYSICAL_ADDRESS */)