diff --git a/common/rfb/ConnParams.cxx b/common/rfb/ConnParams.cxx index 1893063..123b330 100644 --- a/common/rfb/ConnParams.cxx +++ b/common/rfb/ConnParams.cxx @@ -212,7 +212,7 @@ void ConnParams::setEncodings(int nEncodings, const rdr::S32* encodings) break; case pseudoEncodingPreferBandwidth: if (!rfb::Server::ignoreClientSettingsKasm && canChangeSettings) - Server::preferBandwidth.setParam(); + Server::preferBandwidth.setParam(true); break; case pseudoEncodingMaxVideoResolution: if (!rfb::Server::ignoreClientSettingsKasm && canChangeSettings) diff --git a/common/rfb/EncodeManager.cxx b/common/rfb/EncodeManager.cxx index 372fe3f..c28de1c 100644 --- a/common/rfb/EncodeManager.cxx +++ b/common/rfb/EncodeManager.cxx @@ -356,6 +356,16 @@ void EncodeManager::doUpdate(bool allowLossy, const Region& changed_, if (conn->cp.kasmPassed[ConnParams::KASM_MAX_VIDEO_RESOLUTION]) updateMaxVideoRes(&maxVideoX, &maxVideoY); + // The dynamic quality params may have changed + if (Server::dynamicQualityMax && Server::dynamicQualityMax <= 9 && + Server::dynamicQualityMax > Server::dynamicQualityMin) { + dynamicQualityMin = Server::dynamicQualityMin; + dynamicQualityOff = Server::dynamicQualityMax - Server::dynamicQualityMin; + } else if (dynamicQualityMin >= 0) { + dynamicQualityMin = Server::dynamicQualityMin; + dynamicQualityOff = 0; + } + prepareEncoders(allowLossy); changed = changed_;