fixed win32 build
authorLars Op den Kamp <lars@opdenkamp.eu>
Wed, 27 Feb 2013 00:26:08 +0000 (01:26 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Wed, 27 Feb 2013 00:26:08 +0000 (01:26 +0100)
src/LibCecSharp/CecSharpTypes.h
src/lib/LibCECC.cpp
src/lib/adapter/AdapterFactory.cpp
src/lib/adapter/Pulse-Eight/USBCECAdapterDetection.cpp

index 10a0fa946914c1b1cf22bf8d8c62f9bc8dd3056f..c7636a1551bf2cc0696a66c0c942b482673c7319 100644 (file)
@@ -1935,6 +1935,11 @@ namespace CecSharp
     /// 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
index 8309c3c60d0318b2137ca516c2d4a4884a61e2f8..fc5c9c2126cc38be180b3ef3acc3f9cdddc49efd 100644 (file)
@@ -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;
 }
 
index ae906428de81c095be46d0a9c04c8138d0fcbfa1..dbff5c4c328f0461b420238f663577f2970070a1 100644 (file)
@@ -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++)
   {
index 456350f17177ead54003673841a83df551533106..35ba386788a93dcab316b466da3230aca0957058 100644 (file)
@@ -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++;
     }