Update this configuration with data received from libCEC The configuration that was received from libCEC
| 1683 | /// </summary> |
| 1684 | /// <param name="config">The configuration that was received from libCEC</param> |
| 1685 | void Update(const CEC::libcec_configuration &config) |
| 1686 | { |
| 1687 | DeviceTypes->Clear(); |
| 1688 | for (unsigned int iPtr = 0; iPtr < 5; iPtr++) |
| 1689 | DeviceTypes->Types[iPtr] = (CecDeviceType)config.deviceTypes.types[iPtr]; |
| 1690 | |
| 1691 | WakeDevices->Clear(); |
| 1692 | for (uint8_t iPtr = 0; iPtr <= 16; iPtr++) |
| 1693 | if (config.wakeDevices[iPtr]) |
| 1694 | WakeDevices->Set((CecLogicalAddress)iPtr); |
| 1695 | |
| 1696 | PowerOffDevices->Clear(); |
| 1697 | for (uint8_t iPtr = 0; iPtr <= 16; iPtr++) |
| 1698 | if (config.powerOffDevices[iPtr]) |
| 1699 | PowerOffDevices->Set((CecLogicalAddress)iPtr); |
| 1700 | |
| 1701 | LogicalAddresses->Clear(); |
| 1702 | for (uint8_t iPtr = 0; iPtr <= 16; iPtr++) |
| 1703 | if (config.logicalAddresses[iPtr]) |
| 1704 | LogicalAddresses->Set((CecLogicalAddress)iPtr); |
| 1705 | |
| 1706 | DeviceName = gcnew System::String(config.strDeviceName); |
| 1707 | AutodetectAddress = (config.bAutodetectAddress == 1); |
| 1708 | PhysicalAddress = config.iPhysicalAddress; |
| 1709 | BaseDevice = (CecLogicalAddress)config.baseDevice; |
| 1710 | HDMIPort = config.iHDMIPort; |
| 1711 | ClientVersion = config.clientVersion; |
| 1712 | ServerVersion = config.serverVersion; |
| 1713 | TvVendor = (CecVendorId)config.tvVendor; |
| 1714 | GetSettingsFromROM = (config.bGetSettingsFromROM == 1); |
| 1715 | ActivateSource = (config.bActivateSource == 1); |
| 1716 | |
| 1717 | PowerOffOnStandby = (config.bPowerOffOnStandby == 1); |
| 1718 | FirmwareVersion = config.iFirmwareVersion; |
| 1719 | |
| 1720 | char langbuf[4] = { |
| 1721 | config.strDeviceLanguage[0], |
| 1722 | config.strDeviceLanguage[1], |
| 1723 | config.strDeviceLanguage[2], |
| 1724 | (char)0 |
| 1725 | }; |
| 1726 | DeviceLanguage = gcnew System::String(langbuf); |
| 1727 | FirmwareBuildDate = gcnew System::DateTime(1970,1,1,0,0,0,0); |
| 1728 | FirmwareBuildDate = FirmwareBuildDate->AddSeconds(config.iFirmwareBuildDate); |
| 1729 | |
| 1730 | MonitorOnlyClient = (config.bMonitorOnly == 1); |
| 1731 | CECVersion = (CecVersion)config.cecVersion; |
| 1732 | AdapterType = (CecAdapterType)config.adapterType; |
| 1733 | |
| 1734 | ComboKey = (CecUserControlCode)config.comboKey; |
| 1735 | ComboKeyTimeoutMs = config.iComboKeyTimeoutMs; |
| 1736 | ButtonRepeatRateMs = config.iButtonRepeatRateMs; |
| 1737 | ButtonReleaseDelayMs = config.iButtonReleaseDelayMs; |
| 1738 | DoubleTapTimeoutMs = config.iDoubleTapTimeoutMs; |
| 1739 | AutoWakeAVR = (config.bAutoWakeAVR == 1); |
| 1740 | #if CEC_LIB_VERSION_MAJOR >= 5 |
| 1741 | AutoPowerOn = (config.bAutoPowerOn == 1) ? BoolSetting::Enabled : BoolSetting::Disabled; |
| 1742 | #endif |