@@ -608,11 +608,10 @@ fn build_config(
608608 width : u16 ,
609609 height : u16 ,
610610) -> connector:: Config {
611- let ( codec_overrides, lossy_compression) : ( & [ & str ] , bool ) =
612- match options. compression . unwrap_or_default ( ) {
613- RdpTargetCompression :: RemoteFX => ( & [ ] , true ) ,
614- RdpTargetCompression :: Lossless => ( & [ "remotefx:off" ] , false ) ,
615- } ;
611+ let codec_overrides: & [ & str ] = match options. compression . unwrap_or_default ( ) {
612+ RdpTargetCompression :: RemoteFX => & [ ] ,
613+ RdpTargetCompression :: Lossless => & [ "remotefx:off" ] ,
614+ } ;
616615 connector:: Config {
617616 credentials : Credentials :: UsernamePassword {
618617 username : options. username . clone ( ) ,
@@ -628,15 +627,17 @@ fn build_config(
628627 ime_file_name : String :: new ( ) ,
629628 dig_product_id : String :: new ( ) ,
630629 desktop_size : connector:: DesktopSize { width, height } ,
631- // The default codec set advertises RemoteFX; `lossy_compression` additionally lets
632- // the target use dynamic color fidelity / subsampling on legacy bitmap updates,
633- // like desktop clients do. A `lossless` target advertises neither, so it sends
634- // losslessly-compressed 32bpp bitmap updates instead. (`client_codecs_capabilities`
635- // never fails for these inputs; `None` would just drop the flags.)
630+ // The compression mode only controls the codec advertisement: the default set
631+ // includes RemoteFX, while a `lossless` target advertises no codecs so it sends
632+ // losslessly-compressed 32bpp bitmap updates instead. `lossy_compression` stays
633+ // off in every mode — it would advertise the dynamic-color-fidelity / subsampling
634+ // drawing flags, inviting the target to dither legacy bitmap updates down to
635+ // 16bpp. (`client_codecs_capabilities` never fails for these inputs; `None` would
636+ // just drop the flags.)
636637 bitmap : client_codecs_capabilities ( codec_overrides)
637638 . ok ( )
638639 . map ( |codecs| connector:: BitmapConfig {
639- lossy_compression,
640+ lossy_compression : false ,
640641 color_depth : 32 ,
641642 codecs,
642643 } ) ,
0 commit comments