From: Lars Op den Kamp Date: Wed, 27 Feb 2013 00:26:08 +0000 (+0100) Subject: fixed win32 build X-Git-Tag: upstream/2.2.0~1^2~6^2~2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=f2658b50dd6fd1056fbc288b2b1ebcb60e94aa5c;p=deb_libcec.git fixed win32 build --- diff --git a/src/LibCecSharp/CecSharpTypes.h b/src/LibCecSharp/CecSharpTypes.h index 10a0fa9..c7636a1 100644 --- a/src/LibCecSharp/CecSharpTypes.h +++ b/src/LibCecSharp/CecSharpTypes.h @@ -1935,6 +1935,11 @@ namespace CecSharp /// The type of adapter that libCEC is connected to. /// property CecAdapterType AdapterType; + + /// + /// True to power on when quitting the screensaver. + /// + property bool PowerOnScreensaver; }; // the callback methods are called by unmanaged code, so we need some delegates for this diff --git a/src/lib/LibCECC.cpp b/src/lib/LibCECC.cpp index 8309c3c..fc5c9c2 100644 --- a/src/lib/LibCECC.cpp +++ b/src/lib/LibCECC.cpp @@ -411,7 +411,7 @@ uint8_t cec_audio_get_status(void) 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; } diff --git a/src/lib/adapter/AdapterFactory.cpp b/src/lib/adapter/AdapterFactory.cpp index ae90642..dbff5c4 100644 --- a/src/lib/adapter/AdapterFactory.cpp +++ b/src/lib/adapter/AdapterFactory.cpp @@ -57,7 +57,7 @@ using namespace CEC; 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++) { diff --git a/src/lib/adapter/Pulse-Eight/USBCECAdapterDetection.cpp b/src/lib/adapter/Pulse-Eight/USBCECAdapterDetection.cpp index 456350f..35ba386 100644 --- a/src/lib/adapter/Pulse-Eight/USBCECAdapterDetection.cpp +++ b/src/lib/adapter/Pulse-Eight/USBCECAdapterDetection.cpp @@ -417,8 +417,8 @@ uint8_t CUSBCECAdapterDetection::FindAdapters(cec_adapter_descriptor *deviceList 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++; } @@ -426,8 +426,8 @@ uint8_t CUSBCECAdapterDetection::FindAdapters(cec_adapter_descriptor *deviceList 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++; }