cec: added a new setting to control whether to put the TV in standby when the player...
[deb_libcec.git] / src / LibCecSharp / LibCecSharp.cpp
index 0737dbbb77f9adb29eff746fdcdef68efd434e87..2338671d577dfa53448185aacfd58abafc89a753 100644 (file)
@@ -117,7 +117,13 @@ namespace CecSharp
                        }
                        config.bPowerOffScreensaver = netConfig->PowerOffScreensaver ? 1 : 0;
                        config.bPowerOffOnStandby   = netConfig->PowerOffOnStandby ? 1 : 0;
-      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;
+
                        config.callbacks            = &g_cecCallbacks;
                }