LibCecSharp: Update for 1.6.2
[deb_libcec.git] / src / LibCecSharp / LibCecSharp.cpp
index 2338671d577dfa53448185aacfd58abafc89a753..680ccfba6f2ffa51b549e145c202c1c78cb3a97f 100644 (file)
@@ -118,11 +118,17 @@ namespace CecSharp
                        config.bPowerOffScreensaver = netConfig->PowerOffScreensaver ? 1 : 0;
                        config.bPowerOffOnStandby   = netConfig->PowerOffOnStandby ? 1 : 0;
 
-      if (netConfig->ServerVersion >= CecServerVersion::Version1_5_1)
-        config.bSendInactiveSource  = netConfig->SendInactiveSource ? 1 : 0;
+                       if (netConfig->ServerVersion >= CecServerVersion::Version1_5_1)
+                               config.bSendInactiveSource  = netConfig->SendInactiveSource ? 1 : 0;
 
-      if (netConfig->ServerVersion >= CecServerVersion::Version1_6_0)
-        config.bPowerOffDevicesOnStandby  = netConfig->PowerOffDevicesOnStandby ? 1 : 0;
+                       if (netConfig->ServerVersion >= CecServerVersion::Version1_6_0)
+                       {
+                               config.bPowerOffDevicesOnStandby  = netConfig->PowerOffDevicesOnStandby ? 1 : 0;
+                               config.bShutdownOnStandby         = netConfig->ShutdownOnStandby ? 1 : 0;
+                       }
+
+                       if (netConfig->ServerVersion >= CecServerVersion::Version1_6_2)
+                               _snprintf_s(config.strDeviceLanguage, 3, context->marshal_as<const char*>(netConfig->DeviceLanguage));
 
                        config.callbacks            = &g_cecCallbacks;
                }