summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorCorentin Chary <corentincj@iksaif.net>2011-02-04 09:05:54 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2011-02-23 16:28:28 -0600
commit417fca711f7b69694833555da5275c3003dcb769 (patch)
tree7153bcae3113d5970fd5a3c8924763c344b745f2 /ui
parent7dd40f30c6ee87263ff451ca20df7e0899a9018c (diff)
downloadqemu-417fca711f7b69694833555da5275c3003dcb769.tar.gz
qemu-417fca711f7b69694833555da5275c3003dcb769.tar.bz2
qemu-417fca711f7b69694833555da5275c3003dcb769.zip
vnc: don't set the quality if lossy encoding are disabled
This should not change the current behavior, but if any new encoding try to use the tight quality, it will always be set to -1 when lossy encodings are disabled. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/vnc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/vnc.c b/ui/vnc.c
index 560b98d441..9c5c5b3045 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -1780,7 +1780,9 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings)
vs->tight.compression = (enc & 0x0F);
break;
case VNC_ENCODING_QUALITYLEVEL0 ... VNC_ENCODING_QUALITYLEVEL0 + 9:
- vs->tight.quality = (enc & 0x0F);
+ if (vs->vd->lossy) {
+ vs->tight.quality = (enc & 0x0F);
+ }
break;
default:
VNC_DEBUG("Unknown encoding: %d (0x%.8x): %d\n", i, enc, enc);