Fix calculation of maximum lossless refresh area
The update size is in bytes, but we are counting pixels. So make
sure we convert things properly before comparing.
diff --git a/common/rfb/EncodeManager.cxx b/common/rfb/EncodeManager.cxx
index 8f5427c..d783d54 100644
--- a/common/rfb/EncodeManager.cxx
+++ b/common/rfb/EncodeManager.cxx
@@ -476,6 +476,9 @@
// We make a conservative guess at the compression ratio at 2:1
maxUpdateSize *= 2;
+ // We will measure pixels, not bytes (assume 32 bpp)
+ maxUpdateSize /= 4;
+
area = 0;
pendingRefreshRegion.intersect(req).get_rects(&rects);
while (!rects.empty()) {