aboutsummaryrefslogtreecommitdiff
path: root/vnc.c
diff options
context:
space:
mode:
Diffstat (limited to 'vnc.c')
-rw-r--r--vnc.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/vnc.c b/vnc.c
index 11ae3e5172..1fb46bdc76 100644
--- a/vnc.c
+++ b/vnc.c
@@ -1644,7 +1644,7 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings)
vnc_zlib_init(vs);
vs->features = 0;
- vs->vnc_encoding = -1;
+ vs->vnc_encoding = 0;
vs->tight_compression = 9;
vs->tight_quality = 9;
vs->absolute = -1;
@@ -1653,24 +1653,18 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings)
enc = encodings[i];
switch (enc) {
case VNC_ENCODING_RAW:
- if (vs->vnc_encoding != -1) {
- vs->vnc_encoding = enc;
- }
+ vs->vnc_encoding = enc;
break;
case VNC_ENCODING_COPYRECT:
vs->features |= VNC_FEATURE_COPYRECT_MASK;
break;
case VNC_ENCODING_HEXTILE:
vs->features |= VNC_FEATURE_HEXTILE_MASK;
- if (vs->vnc_encoding != -1) {
- vs->vnc_encoding = enc;
- }
+ vs->vnc_encoding = enc;
break;
case VNC_ENCODING_ZLIB:
vs->features |= VNC_FEATURE_ZLIB_MASK;
- if (vs->vnc_encoding != -1) {
- vs->vnc_encoding = enc;
- }
+ vs->vnc_encoding = enc;
break;
case VNC_ENCODING_DESKTOPRESIZE:
vs->features |= VNC_FEATURE_RESIZE_MASK;