X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FLibCEC.cpp;h=c24b4ed96e7d2ffcd8cb93fdbc7051d3325a0d30;hb=d9de2aae6b2f47b8e1faacc69adba7406b9d85f0;hp=fa2195374124c53e486535f2bc8ff4df9c1564d3;hpb=e7fd53c8e125db215629cdc557c45e2e875d02cc;p=deb_libcec.git diff --git a/src/lib/LibCEC.cpp b/src/lib/LibCEC.cpp index fa21953..c24b4ed 100644 --- a/src/lib/LibCEC.cpp +++ b/src/lib/LibCEC.cpp @@ -1,7 +1,7 @@ /* * This file is part of the libCEC(R) library. * - * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited. All rights reserved. + * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved. * libCEC(R) is an original work, containing original code. * * libCEC(R) is a trademark of Pulse-Eight Limited. @@ -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; }