diff options
author | runge <runge> | 2006-01-19 03:54:10 +0000 |
---|---|---|
committer | runge <runge> | 2006-01-19 03:54:10 +0000 |
commit | 17e6b6a2bf6def6b380bee2fcc0fb9e8254518f4 (patch) | |
tree | 8a387c278f6b7a66a91fd4e8c5deb5b8b9a14e79 /x11vnc/scan.c | |
parent | e38c3c224b19775a70c8ee5b8eddbf81be07a0bd (diff) | |
download | libtdevnc-17e6b6a2bf6def6b380bee2fcc0fb9e8254518f4.tar.gz libtdevnc-17e6b6a2bf6def6b380bee2fcc0fb9e8254518f4.zip |
x11vnc: -8to24 now works on default depth 8 displays.
Diffstat (limited to 'x11vnc/scan.c')
-rw-r--r-- | x11vnc/scan.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/x11vnc/scan.c b/x11vnc/scan.c index e956dc9..3b0afe6 100644 --- a/x11vnc/scan.c +++ b/x11vnc/scan.c @@ -1160,6 +1160,7 @@ void scale_rect(double factor, int blend, int interpolate, int Bpp, void scale_and_mark_rect(int X1, int Y1, int X2, int Y2) { char *src_fb = main_fb; + int Bpp = bpp/8, fac = 1; if (!screen || !rfb_fb || !main_fb) { return; @@ -1185,10 +1186,13 @@ void scale_and_mark_rect(int X1, int Y1, int X2, int Y2) { if (cmap8to24 && cmap8to24_fb) { src_fb = cmap8to24_fb; + if (scaling && depth == 8) { + fac = 4; + } } - scale_rect(scale_fac, scaling_blend, scaling_interpolate, bpp/8, - src_fb, main_bytes_per_line, rfb_fb, rfb_bytes_per_line, + scale_rect(scale_fac, scaling_blend, scaling_interpolate, fac * Bpp, + src_fb, fac * main_bytes_per_line, rfb_fb, rfb_bytes_per_line, dpy_x, dpy_y, scaled_x, scaled_y, X1, Y1, X2, Y2, 1); } |