}
#endif
+bool CUSBCECAdapterDetection::CanAutodetect(void)
+{
+#if defined(__APPLE__) || defined(HAVE_LIBUDEV) || defined(__WINDOWS__) || defined(__FreeBSD__)
+ return true;
+#else
+ return false;
+#endif
+}
+
uint8_t CUSBCECAdapterDetection::FindAdapters(cec_adapter *deviceList, uint8_t iBufSize, const char *strDevicePath /* = NULL */)
{
uint8_t iFound(0);
for (i = 0; i < 8; ++i)
{
(void)snprintf(devicePath, sizeof(devicePath), "/dev/ttyU%d", i);
- if (!access(devicePath, 0))
- {
- snprintf(deviceList[iFound].path, sizeof(deviceList[iFound].path), "%s", devicePath);
- snprintf(deviceList[iFound].comm, sizeof(deviceList[iFound].path), "%s", devicePath);
- ++iFound;
- }
+ if (!access(devicePath, 0))
+ {
+ snprintf(deviceList[iFound ].path, sizeof(deviceList[iFound].path), "%s", devicePath);
+ snprintf(deviceList[iFound++].comm, sizeof(deviceList[iFound].path), "%s", devicePath);
+ }
}
#endif