summaryrefslogtreecommitdiffstats
path: root/libvncserver/scale.c
diff options
context:
space:
mode:
authordscho <dscho>2008-01-29 11:50:16 +0000
committerdscho <dscho>2008-01-29 11:50:16 +0000
commit059afcdf819f63a5ac3a93ef3060fd172234ab82 (patch)
tree2eef987a58512b44445040fb8e78bd65aba09f26 /libvncserver/scale.c
parent09d902c5b7ce1881e7a4d9642bfae8202f13387f (diff)
downloadlibtdevnc-059afcdf819f63a5ac3a93ef3060fd172234ab82.tar.gz
libtdevnc-059afcdf819f63a5ac3a93ef3060fd172234ab82.zip
Add ZYWRLE server-side support (thanks Noriaki Yamazaki, Hitachi)
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 'libvncserver/scale.c')
-rw-r--r--libvncserver/scale.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libvncserver/scale.c b/libvncserver/scale.c
index 67de35f..55598fa 100644
--- a/libvncserver/scale.c
+++ b/libvncserver/scale.c
@@ -151,6 +151,10 @@ void rfbScaledScreenUpdateRect(rfbScreenInfoPtr screen, rfbScreenInfoPtr ptr, in
h1 = h0;
rfbScaledCorrection(screen, ptr, &x1, &y1, &w1, &h1, "rfbScaledScreenUpdateRect");
+ x0 = ScaleX(ptr, screen, x1);
+ y0 = ScaleY(ptr, screen, y1);
+ w0 = ScaleX(ptr, screen, w1);
+ h0 = ScaleY(ptr, screen, h1);
bitsPerPixel = screen->bitsPerPixel;
bytesPerPixel = bitsPerPixel / 8;
@@ -197,8 +201,8 @@ void rfbScaledScreenUpdateRect(rfbScreenInfoPtr screen, rfbScreenInfoPtr ptr, in
/* Get the totals for rgb from the source grid... */
for (w = 0; w < areaX; w++) {
for (v = 0; v < areaY; v++) {
- srcptr2 = &srcptr[(((x * areaX) + v) * bytesPerPixel) +
- (w * screen->paddedWidthInBytes)];
+ srcptr2 = &srcptr[(((x * areaX) + w) * bytesPerPixel) +
+ (v * screen->paddedWidthInBytes)];
pixel_value = 0;