summaryrefslogtreecommitdiffstats
path: root/x11vnc/scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'x11vnc/scan.c')
-rw-r--r--x11vnc/scan.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/x11vnc/scan.c b/x11vnc/scan.c
index a5a4670..33a983e 100644
--- a/x11vnc/scan.c
+++ b/x11vnc/scan.c
@@ -1285,8 +1285,12 @@ void scale_and_mark_rect(int X1, int Y1, int X2, int Y2, int mark) {
if (cmap8to24 && cmap8to24_fb) {
src_fb = cmap8to24_fb;
- if (scaling && depth == 8) {
- fac = 4;
+ if (scaling) {
+ if (depth <= 8) {
+ fac = 4;
+ } else if (depth <= 16) {
+ fac = 2;
+ }
}
}
dst_fb = rfb_fb;