LibCecSharp: fixed - set the primary LA in CecLogicalAddresses
[deb_libcec.git] / src / cec-config / cec-config.cpp
index 7b203cb87c079b7663cb4c850009a9fcdfed2945..fbfdd3643a7a72038a9b7034539edd3079d9d413 100644 (file)
@@ -30,7 +30,8 @@
  *     http://www.pulse-eight.net/
  */
 
-#include "../../include/cec.h"
+#include "../env.h"
+#include "../include/cec.h"
 
 #include <cstdio>
 #include <fcntl.h>
@@ -41,6 +42,7 @@
 #include "../lib/platform/threads/mutex.h"
 #include "../lib/platform/util/timeutils.h"
 #include "../lib/implementations/CECCommandHandler.h"
+#include "../lib/platform/util/StdString.h"
 
 using namespace CEC;
 using namespace std;
@@ -169,6 +171,9 @@ bool OpenConnection(cec_device_type type = CEC_DEVICE_TYPE_RECORDING_DEVICE)
   if (!g_parser)
     return false;
 
+  // init video on targets that need this
+  g_parser->InitVideoStandalone();
+
   CStdString strPort;
   cec_adapter devices[10];
   uint8_t iDevicesFound = g_parser->FindAdapters(devices, 10, NULL);
@@ -431,11 +436,11 @@ int main (int UNUSED(argc), char *UNUSED(argv[]))
     CStdString strWakeDevices;
     for (uint8_t iPtr = 0; iPtr < 16; iPtr++)
       if (g_config.wakeDevices[iPtr])
-        strWakeDevices.AppendFormat(" %d" + iPtr);
+        strWakeDevices.AppendFormat(" %d", iPtr);
     CStdString strStandbyDevices;
     for (uint8_t iPtr = 0; iPtr < 16; iPtr++)
       if (g_config.powerOffDevices[iPtr])
-        strStandbyDevices.AppendFormat(" %d" + iPtr);
+        strStandbyDevices.AppendFormat(" %d", iPtr);
 
     configOutput <<
         "<settings>\n" <<