/// The type of adapter that libCEC is connected to.
/// </summary>
property CecAdapterType AdapterType;
+
+ /// <summary>
+ /// True to power on when quitting the screensaver.
+ /// </summary>
+ property bool PowerOnScreensaver;
};
// the callback methods are called by unmanaged code, so we need some delegates for this
int8_t cec_detect_adapters(cec_adapter_descriptor *deviceList, uint8_t iBufSize, const char *strDevicePath, int bQuickScan)
{
if (cec_parser)
- return cec_parser->DetectAdapters(deviceList, iBufSize, strDevicePath, bQuickScan);
+ return cec_parser->DetectAdapters(deviceList, iBufSize, strDevicePath, bQuickScan == 1);
return -1;
}
int8_t CAdapterFactory::FindAdapters(cec_adapter *deviceList, uint8_t iBufSize, const char *strDevicePath /* = NULL */)
{
- cec_adapter_descriptor devices[iBufSize];
+ cec_adapter_descriptor devices[50];
int8_t iReturn = DetectAdapters(devices, iBufSize, strDevicePath);
for (int8_t iPtr = 0; iPtr < iReturn; iPtr++)
{
if (FindComPortForComposite(strId, deviceList[iFound].strComName, sizeof(deviceList[iFound].strComName)))
{
snprintf(deviceList[iFound].strComPath, sizeof(deviceList[iFound].strComPath), "%s", devicedetailData->DevicePath);
- deviceList[iFound].iVendorId = iVendor;
- deviceList[iFound].iProductId = iProduct;
+ deviceList[iFound].iVendorId = (uint16_t)iVendor;
+ deviceList[iFound].iProductId = (uint16_t)iProduct;
deviceList[iFound].adapterType = ADAPTERTYPE_P8_EXTERNAL; // will be overridden when not doing a "quick scan" by the actual type
iFound++;
}
else if (GetComPortFromHandle(hDevHandle, &devInfoData, deviceList[iFound].strComName, sizeof(deviceList[iFound].strComName)))
{
snprintf(deviceList[iFound].strComPath, sizeof(deviceList[iFound].strComPath), "%s", devicedetailData->DevicePath);
- deviceList[iFound].iVendorId = iVendor;
- deviceList[iFound].iProductId = iProduct;
+ deviceList[iFound].iVendorId = (uint16_t)iVendor;
+ deviceList[iFound].iProductId = (uint16_t)iProduct;
deviceList[iFound].adapterType = ADAPTERTYPE_P8_EXTERNAL; // will be overridden when not doing a "quick scan" by the actual type
iFound++;
}