diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2011-08-24 22:45:02 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2011-08-24 22:45:02 -0700 |
commit | 12ce9c136fd577023e77e3bd51e6f25a051ca3a1 (patch) | |
tree | 29f33f530b18f7d654764b0adab386d95d39eb73 | |
parent | b7aecf16b0f54a799854abba26b4be402c7aef4d (diff) | |
download | xrdp-proprietary-12ce9c136fd577023e77e3bd51e6f25a051ca3a1.tar.gz xrdp-proprietary-12ce9c136fd577023e77e3bd51e6f25a051ca3a1.zip |
add max bpp option to xrdp.ini
-rw-r--r-- | libxrdp/libxrdpinc.h | 1 | ||||
-rw-r--r-- | libxrdp/xrdp_rdp.c | 11 | ||||
-rw-r--r-- | xrdp/xrdp.ini | 2 |
3 files changed, 13 insertions, 1 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, diff --git a/xrdp/xrdp.ini b/xrdp/xrdp.ini index e5e6e3d9..645ee024 100644 --- a/xrdp/xrdp.ini +++ b/xrdp/xrdp.ini @@ -5,6 +5,7 @@ bitmap_compression=yes port=3389 crypt_level=low channel_code=1 +max_bpp=16 #black=000000 #grey=d6d3ce #dark_grey=808080 @@ -15,7 +16,6 @@ channel_code=1 #green=00ff00 #background=626c72 - [xrdp1] name=sesman-Xvnc lib=libvnc.so |