diff options
author | dscho <dscho> | 2003-07-28 12:01:07 +0000 |
---|---|---|
committer | dscho <dscho> | 2003-07-28 12:01:07 +0000 |
commit | 13b358fed1b89a7a7f8c47bc175dcb3ccae1e39b (patch) | |
tree | 8ca17b27e8b953403b93625381aa162d734c4287 /rfbserver.c | |
parent | eef408c1d84c7aaceb9732dd9a7e216886d2c2f8 (diff) | |
download | libtdevnc-13b358fed1b89a7a7f8c47bc175dcb3ccae1e39b.tar.gz libtdevnc-13b358fed1b89a7a7f8c47bc175dcb3ccae1e39b.zip |
fixed maxRectsPerUpdate with Tight encoding bug; some autoconfing; stderr should not be used in a library (use rfbLog instead)
Diffstat (limited to 'rfbserver.c')
-rw-r--r-- | rfbserver.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/rfbserver.c b/rfbserver.c index 9ab205e..aa4213f 100644 --- a/rfbserver.c +++ b/rfbserver.c @@ -1214,16 +1214,17 @@ rfbSendFramebufferUpdate(cl, givenUpdateRegion) fu->type = rfbFramebufferUpdate; if (nUpdateRegionRects != 0xFFFF) { if(cl->screen->maxRectsPerUpdate>0 + /* Tight encoding counts the rectangles differently */ + && cl->preferredEncoding != rfbEncodingTight && nUpdateRegionRects>cl->screen->maxRectsPerUpdate) { sraRegion* newUpdateRegion = sraRgnBBox(updateRegion); sraRgnDestroy(updateRegion); updateRegion = newUpdateRegion; nUpdateRegionRects = sraRgnCountRects(updateRegion); } - fu->nRects = Swap16IfLE((uint16_t)(sraRgnCountRects(updateCopyRegion) + - nUpdateRegionRects + - !!sendCursorShape + !!sendCursorPos)); + nUpdateRegionRects + + !!sendCursorShape + !!sendCursorPos)); } else { fu->nRects = 0xFFFF; } |