From 3d9a5639838d18e790586f0acc294fdf7ebadd74 Mon Sep 17 00:00:00 2001 From: dscho Date: Thu, 31 Jan 2008 11:52:25 +0000 Subject: Move tightQualityLevel out of the JPEG specific part The variable tightQualityLevel is used for ZYWRLE compression, too, so if libjpeg is not present, but libz is, we still need to have that struct member. Signed-off-by: Johannes Schindelin --- libvncserver/rfbserver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libvncserver') diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c index 905fffe..e809110 100644 --- a/libvncserver/rfbserver.c +++ b/libvncserver/rfbserver.c @@ -369,9 +369,9 @@ rfbNewTCPOrUDPClient(rfbScreenInfoPtr rfbScreen, UNLOCK(rfbClientListMutex); #ifdef LIBVNCSERVER_HAVE_LIBZ + cl->tightQualityLevel = -1; #ifdef LIBVNCSERVER_HAVE_LIBJPEG cl->tightCompressLevel = TIGHT_DEFAULT_COMPRESSION; - cl->tightQualityLevel = -1; { int i; for (i = 0; i < 4; i++) @@ -2004,12 +2004,12 @@ rfbProcessClientNormalMessage(rfbClientPtr cl) cl->tightCompressLevel = enc & 0x0F; rfbLog("Using compression level %d for client %s\n", cl->tightCompressLevel, cl->host); +#endif } else if ( enc >= (uint32_t)rfbEncodingQualityLevel0 && enc <= (uint32_t)rfbEncodingQualityLevel9 ) { cl->tightQualityLevel = enc & 0x0F; rfbLog("Using image quality level %d for client %s\n", cl->tightQualityLevel, cl->host); -#endif } else #endif { -- cgit v1.2.1