X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FLibCEC.cpp;h=c24b4ed96e7d2ffcd8cb93fdbc7051d3325a0d30;hb=bfea6e0a8ee4bc9e40c64ea68f22db69ac3cb26f;hp=c04283d1871a7e8b76b34767b9211e32ac95fb5f;hpb=a9403e17f1fbb584aa28d493c967f94671d158b7;p=deb_libcec.git diff --git a/src/lib/LibCEC.cpp b/src/lib/LibCEC.cpp index c04283d..c24b4ed 100644 --- a/src/lib/LibCEC.cpp +++ b/src/lib/LibCEC.cpp @@ -560,17 +560,20 @@ uint8_t CLibCEC::AudioStatus(void) return m_client ? m_client->AudioStatus() : (uint8_t)CEC_AUDIO_VOLUME_STATUS_UNKNOWN; } -int8_t CLibCEC::DetectAdapters(cec_adapter_descriptor *deviceList, uint8_t iBufSize, const char *strDevicePath /* = NULL */) +int8_t CLibCEC::DetectAdapters(cec_adapter_descriptor *deviceList, uint8_t iBufSize, const char *strDevicePath /* = NULL */, bool bQuickScan /* = false */) { int8_t iAdaptersFound = CAdapterFactory(this).DetectAdapters(deviceList, iBufSize, strDevicePath); - for (int8_t iPtr = 0; iPtr < iAdaptersFound; iPtr++) + if (!bQuickScan) { - libcec_configuration config; - GetDeviceInformation(deviceList[iPtr].strComName, &config); - deviceList[iPtr].iFirmwareVersion = config.iFirmwareVersion; - deviceList[iPtr].iPhysicalAddress = config.iPhysicalAddress; - deviceList[iPtr].iFirmwareBuildDate = config.iFirmwareBuildDate; - deviceList[iPtr].adapterType = config.adapterType; + for (int8_t iPtr = 0; iPtr < iAdaptersFound; iPtr++) + { + libcec_configuration config; + GetDeviceInformation(deviceList[iPtr].strComName, &config); + deviceList[iPtr].iFirmwareVersion = config.iFirmwareVersion; + deviceList[iPtr].iPhysicalAddress = config.iPhysicalAddress; + deviceList[iPtr].iFirmwareBuildDate = config.iFirmwareBuildDate; + deviceList[iPtr].adapterType = config.adapterType; + } } return iAdaptersFound; }