Respecting color depth with RDP_CODEC_ID_NONE.
authorArmin Novak <armin.novak@thincast.com>
Wed, 7 Dec 2016 10:26:42 +0000 (11:26 +0100)
committerArmin Novak <armin.novak@thincast.com>
Wed, 7 Dec 2016 12:22:52 +0000 (13:22 +0100)
client/X11/xf_gdi.c
libfreerdp/gdi/gdi.c

index a3614d5..753d453 100644 (file)
@@ -1039,7 +1039,7 @@ static BOOL xf_gdi_surface_bits(rdpContext* context,
 
                case RDP_CODEC_ID_NONE:
                        pSrcData = cmd->bitmapData;
-                       format = PIXEL_FORMAT_BGRX32;
+                       format = gdi_get_pixel_format(cmd->bpp);
 
                        if (!freerdp_image_copy(gdi->primary_buffer, gdi->dstFormat, stride,
                                                0, 0,
index dc1c2cf..d1b8b2e 100644 (file)
@@ -985,7 +985,7 @@ static BOOL gdi_surface_bits(rdpContext* context,
                        break;
 
                case RDP_CODEC_ID_NONE:
-                       format = PIXEL_FORMAT_BGRX32;
+                       format = gdi_get_pixel_format(cmd->bpp);
 
                        if (!freerdp_image_copy(gdi->primary_buffer, gdi->dstFormat, gdi->stride,
                                                cmd->destLeft, cmd->destTop, cmd->width, cmd->height,