mirror of https://github.com/neutrinolabs/xrdp
add max bpp option to xrdp.ini
This commit is contained in:
parent
b7aecf16b0
commit
12ce9c136f
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue