diff options
author | Henrik Andersson <hean01@cendio.com> | 2017-10-26 16:31:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-26 16:31:21 +0200 |
commit | 71b0100044207d87113c1ced3e7369ed771ed2b7 (patch) | |
tree | 9f9ca9f02c81d6908e02370b5fc1fc6f9f9ca5fd | |
parent | 04bbb961ce7d7f25364299a6a9236915ddf573fc (diff) | |
parent | 8c162a55636d91c3031c024b4eaf15ba509f8905 (diff) | |
download | rdesktop-71b0100044207d87113c1ced3e7369ed771ed2b7.zip |
Merge pull request #177 from derfian/32bit-color
Enable 32-bit color depths
-rw-r--r-- | secure.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -395,7 +395,7 @@ sec_out_mcs_connect_initial_pdu(STREAM s, uint32 selected_protocol) unsigned int i; uint32 rdpversion = RDP_40; uint16 capflags = RNS_UD_CS_SUPPORT_ERRINFO_PDU; - uint16 colorsupport = RNS_UD_24BPP_SUPPORT | RNS_UD_16BPP_SUPPORT; + uint16 colorsupport = RNS_UD_24BPP_SUPPORT | RNS_UD_16BPP_SUPPORT | RNS_UD_32BPP_SUPPORT; if (g_rdp_version >= RDP_V5) rdpversion = RDP_50; @@ -441,7 +441,13 @@ sec_out_mcs_connect_initial_pdu(STREAM s, uint32 selected_protocol) out_uint16_le(s, RNS_UD_COLOR_8BPP); /* postBeta2ColorDepth (overrides colorDepth) */ out_uint16_le(s, 1); /* clientProductId (should be 1) */ out_uint32_le(s, 0); /* serialNumber (should be 0) */ - out_uint16_le(s, g_server_depth); /* highColorDepth (overrides postBeta2ColorDepth) */ + + /* highColorDepth (overrides postBeta2ColorDepth). Capped at 24BPP. + To get 32BPP sessions, we need to set a capability flag. */ + out_uint16_le(s, MIN(g_server_depth, 24)); + if (g_server_depth == 32) + capflags |= RNS_UD_CS_WANT_32BPP_SESSION; + out_uint16_le(s, colorsupport); /* supportedColorDepths */ out_uint16_le(s, capflags); /* earlyCapabilityFlags */ out_uint8s(s, 64); /* clientDigProductId */ |