diff options
-rw-r--r-- | libvncserver/rfbserver.c | 4 | ||||
-rw-r--r-- | rfb/rfb.h | 3 |
2 files changed, 4 insertions, 3 deletions
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 { @@ -525,6 +525,8 @@ typedef struct _rfbClientRec { struct z_stream_s compStream; rfbBool compStreamInited; uint32_t zlibCompressLevel; + /* the quality level is also used by ZYWRLE */ + int tightQualityLevel; #ifdef LIBVNCSERVER_HAVE_LIBJPEG /* tight encoding -- preserve zlib streams' state for each client */ @@ -532,7 +534,6 @@ typedef struct _rfbClientRec { rfbBool zsActive[4]; int zsLevel[4]; int tightCompressLevel; - int tightQualityLevel; #endif #endif |