fixed win32 build
[deb_libcec.git] / src / lib / adapter / AdapterFactory.cpp
index 1596cfd1aeebb07d414e8eb74eba9e692555b628..dbff5c4c328f0461b420238f663577f2970070a1 100644 (file)
@@ -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.
@@ -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++)
   {
@@ -91,6 +91,7 @@ int8_t CAdapterFactory::DetectAdapters(cec_adapter_descriptor *deviceList, uint8
     snprintf(deviceList[iAdaptersFound].strComName, sizeof(deviceList[iAdaptersFound].strComName), CEC_RPI_VIRTUAL_COM);
     deviceList[iAdaptersFound].iVendorId = RPI_ADAPTER_VID;
     deviceList[iAdaptersFound].iProductId = RPI_ADAPTER_PID;
+    deviceList[iAdaptersFound].adapterType = ADAPTERTYPE_RPI;
     iAdaptersFound++;
   }
 #endif
@@ -103,6 +104,7 @@ int8_t CAdapterFactory::DetectAdapters(cec_adapter_descriptor *deviceList, uint8
     snprintf(deviceList[iAdaptersFound].comm, sizeof(deviceList[iAdaptersFound].strComName), CEC_TDA995x_VIRTUAL_COM);
     deviceList[iAdaptersFound].iVendorId = TDA995X_ADAPTER_VID;
     deviceList[iAdaptersFound].iProductId = TDA995X_ADAPTER_PID;
+    deviceList[iAdaptersFound].adapterType = ADAPTERTYPE_TDA995x;
     iAdaptersFound++;
   }
 #endif