diff options
author | Corentin Chary <corentincj@iksaif.net> | 2010-05-19 09:24:01 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-06-01 12:53:09 -0500 |
commit | a9f20d31a8332ea4d6a0c90b9731f11a51cff6db (patch) | |
tree | 3888e8cb5e9559c48c8da0bf4ca04f4651e00bf9 | |
parent | 9af9b330c5e77024efdc5698ee38ed8ef246337b (diff) | |
download | qemu-a9f20d31a8332ea4d6a0c90b9731f11a51cff6db.zip qemu-a9f20d31a8332ea4d6a0c90b9731f11a51cff6db.tar.gz qemu-a9f20d31a8332ea4d6a0c90b9731f11a51cff6db.tar.bz2 |
Revert "vnc: set the right prefered encoding"
This patch was wrong, because the loop was already reversed,
so the first encoding was correctly set at the end of the loopp.
This reverts commit 14eb8b6829ad9dee7035de729e083844a425f274.
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | vnc.c | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -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; |