X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2FLibCecSharp%2FLibCecSharp.cpp;h=680ccfba6f2ffa51b549e145c202c1c78cb3a97f;hb=e736e6becbbd0db37145c7b8a52100456ffd095e;hp=0737dbbb77f9adb29eff746fdcdef68efd434e87;hpb=bd624ba8248a39d6ab7752d8764683a0cbc1e422;p=deb_libcec.git diff --git a/src/LibCecSharp/LibCecSharp.cpp b/src/LibCecSharp/LibCecSharp.cpp index 0737dbb..680ccfb 100644 --- a/src/LibCecSharp/LibCecSharp.cpp +++ b/src/LibCecSharp/LibCecSharp.cpp @@ -117,7 +117,19 @@ 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.bShutdownOnStandby = netConfig->ShutdownOnStandby ? 1 : 0; + } + + if (netConfig->ServerVersion >= CecServerVersion::Version1_6_2) + _snprintf_s(config.strDeviceLanguage, 3, context->marshal_as(netConfig->DeviceLanguage)); + config.callbacks = &g_cecCallbacks; }