Enable rdp-compression for all bpps.
Many thanks to Vahur Sinijärv <vahur.sinijarv@cydonia.ee> for finding the fix. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@885 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
daf84b718f
commit
87d8eefba0
@ -6,6 +6,7 @@ rdesktop (1.?.?)
|
||||
* Added korean keymap
|
||||
* Xembed fixes to work with krdc correctly
|
||||
* Portability fixes
|
||||
* Support for RDP-compression (all bpps)
|
||||
|
||||
rdesktop (1.4.0)
|
||||
* Basic disk-, parallel-, printer- and serial-redirection
|
||||
|
@ -85,6 +85,7 @@ BOOL g_console_session = False;
|
||||
BOOL g_numlock_sync = False;
|
||||
BOOL g_owncolmap = False;
|
||||
BOOL g_ownbackstore = True; /* We can't rely on external BackingStore */
|
||||
BOOL g_rdp_compression = False;
|
||||
uint32 g_embed_wnd;
|
||||
uint32 g_rdp5_performanceflags =
|
||||
RDP5_NO_WALLPAPER | RDP5_NO_FULLWINDOWDRAG | RDP5_NO_MENUANIMATIONS;
|
||||
@ -575,6 +576,7 @@ main(int argc, char *argv[])
|
||||
case 'z':
|
||||
DEBUG(("rdp compression enabled\n"));
|
||||
flags |= RDP_COMPRESSION;
|
||||
g_rdp_compression = True;
|
||||
break;
|
||||
|
||||
case 'x':
|
||||
@ -740,12 +742,6 @@ main(int argc, char *argv[])
|
||||
STRNCPY(g_hostname, fullhostname, sizeof(g_hostname));
|
||||
}
|
||||
|
||||
if ((flags & RDP_COMPRESSION) && (g_server_bpp > 8))
|
||||
{
|
||||
warning("rdp compression not supported for bpp > 8, compression disabled\n");
|
||||
flags ^= RDP_COMPRESSION;
|
||||
}
|
||||
|
||||
if (prompt_password && read_password(password, sizeof(password)))
|
||||
flags |= RDP_LOGON_AUTO;
|
||||
|
||||
|
24
rdp.c
24
rdp.c
@ -49,6 +49,7 @@ extern int g_width;
|
||||
extern int g_height;
|
||||
extern BOOL g_bitmap_cache;
|
||||
extern BOOL g_bitmap_cache_persist_enable;
|
||||
extern BOOL g_rdp_compression;
|
||||
|
||||
uint8 *g_next_packet;
|
||||
uint32 g_rdp_shareid;
|
||||
@ -659,12 +660,33 @@ rdp_out_bmpcache_caps(STREAM s)
|
||||
static void
|
||||
rdp_out_bmpcache2_caps(STREAM s)
|
||||
{
|
||||
uint16 cellsize;
|
||||
|
||||
out_uint16_le(s, RDP_CAPSET_BMPCACHE2);
|
||||
out_uint16_le(s, RDP_CAPLEN_BMPCACHE2);
|
||||
|
||||
out_uint16_le(s, g_bitmap_cache_persist_enable ? 2 : 0); /* version */
|
||||
|
||||
out_uint16_le(s, 0x0300); /* flags? number of caches? */
|
||||
/* Cellsize:
|
||||
01 = 16x16, 02 = 32x32, 03 = 64x64
|
||||
log2(cell size) - 3
|
||||
*/
|
||||
|
||||
cellsize = 0x03;
|
||||
|
||||
if (g_rdp_compression)
|
||||
{
|
||||
switch (g_server_bpp)
|
||||
{
|
||||
case 24:
|
||||
case 16:
|
||||
case 15:
|
||||
cellsize = 0x02;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
out_uint16_le(s, (0x0000 | (cellsize << 8))); /* flags? number of caches? */
|
||||
|
||||
out_uint32_le(s, BMPCACHE2_C0_CELLS);
|
||||
out_uint32_le(s, BMPCACHE2_C1_CELLS);
|
||||
|
Loading…
Reference in New Issue
Block a user