summaryrefslogtreecommitdiffstats
path: root/libvncserver/zlib.c
diff options
context:
space:
mode:
authorsteven_carr <steven_carr>2006-05-03 19:29:18 +0000
committersteven_carr <steven_carr>2006-05-03 19:29:18 +0000
commit2670641432683c15529d93f3ec2e09fed220b53c (patch)
tree29d517f032b71b673681574dc352d80096a8426f /libvncserver/zlib.c
parentafa9fae0248650cb358463c37756c3560da4b57a (diff)
downloadlibtdevnc-2670641432683c15529d93f3ec2e09fed220b53c.tar.gz
libtdevnc-2670641432683c15529d93f3ec2e09fed220b53c.zip
Client Independent Server Side Scaling is now supported
Both PalmVNC and UltraVNC SetScale messages are supported
Diffstat (limited to 'libvncserver/zlib.c')
-rw-r--r--libvncserver/zlib.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libvncserver/zlib.c b/libvncserver/zlib.c
index 8503f59..321d86f 100644
--- a/libvncserver/zlib.c
+++ b/libvncserver/zlib.c
@@ -64,13 +64,13 @@ rfbSendOneRectEncodingZlib(rfbClientPtr cl,
int deflateResult;
int previousOut;
int i;
- char *fbptr = (cl->screen->frameBuffer + (cl->screen->paddedWidthInBytes * y)
- + (x * (cl->screen->bitsPerPixel / 8)));
+ char *fbptr = (cl->scaledScreen->frameBuffer + (cl->scaledScreen->paddedWidthInBytes * y)
+ + (x * (cl->scaledScreen->bitsPerPixel / 8)));
int maxRawSize;
int maxCompSize;
- maxRawSize = (cl->screen->width * cl->screen->height
+ maxRawSize = (cl->scaledScreen->width * cl->scaledScreen->height
* (cl->format.bitsPerPixel / 8));
if (zlibBeforeBufSize < maxRawSize) {
@@ -84,7 +84,7 @@ rfbSendOneRectEncodingZlib(rfbClientPtr cl,
/* zlib compression is not useful for very small data sets.
* So, we just send these raw without any compression.
*/
- if (( w * h * (cl->screen->bitsPerPixel / 8)) <
+ if (( w * h * (cl->scaledScreen->bitsPerPixel / 8)) <
VNC_ENCODE_ZLIB_MIN_COMP_SIZE ) {
int result;
@@ -126,7 +126,7 @@ rfbSendOneRectEncodingZlib(rfbClientPtr cl,
*/
(*cl->translateFn)(cl->translateLookupTable, &cl->screen->serverFormat,
&cl->format, fbptr, zlibBeforeBuf,
- cl->screen->paddedWidthInBytes, w, h);
+ cl->scaledScreen->paddedWidthInBytes, w, h);
cl->compStream.next_in = ( Bytef * )zlibBeforeBuf;
cl->compStream.avail_in = w * h * (cl->format.bitsPerPixel / 8);