summaryrefslogtreecommitdiffstats
path: root/libxrdp
diff options
context:
space:
mode:
Diffstat (limited to 'libxrdp')
-rw-r--r--libxrdp/libxrdpinc.h1
-rw-r--r--libxrdp/xrdp_rdp.c11
2 files changed, 12 insertions, 0 deletions
diff --git a/libxrdp/libxrdpinc.h b/libxrdp/libxrdpinc.h
index a32fdce5..8d00fe11 100644
--- a/libxrdp/libxrdpinc.h
+++ b/libxrdp/libxrdpinc.h
@@ -64,6 +64,7 @@ struct xrdp_client_info
int brush_cache_code; /* 0 = no cache 1 = 8x8 standard cache
2 = arbitrary dimensions */
char client_ip[256];
+ int max_bpp;
};
struct xrdp_brush
diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c
index fa833765..78d0762c 100644
--- a/libxrdp/xrdp_rdp.c
+++ b/libxrdp/xrdp_rdp.c
@@ -117,6 +117,10 @@ xrdp_rdp_read_config(struct xrdp_client_info* client_info)
client_info->channel_code = 1;
}
}
+ else if (g_strcasecmp(item, "max_bpp") == 0)
+ {
+ client_info->max_bpp = g_atoi(value);
+ }
}
list_delete(items);
list_delete(values);
@@ -362,6 +366,13 @@ xrdp_rdp_parse_client_mcs_data(struct xrdp_rdp* self)
self->client_info.bpp = 24;
break;
}
+ if (self->client_info.max_bpp > 0)
+ {
+ if (self->client_info.bpp > self->client_info.max_bpp)
+ {
+ self->client_info.bpp = self->client_info.max_bpp;
+ }
+ }
p->p = p->data;
DEBUG(("client width %d, client height %d bpp %d",
self->client_info.width, self->client_info.height,