From ad7ab67571ff482bc40e2e15f5d2be242d37ac85 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sun, 22 Sep 2019 14:36:34 -0700 Subject: [PATCH] GUACAMOLE-249: The freerdp/gdi/gdi.h header is required to access contents of rdpGdi struct. --- src/protocols/rdp/rdp_bitmap.c | 5 +++-- src/protocols/rdp/rdp_color.c | 1 + src/protocols/rdp/rdp_pointer.c | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/protocols/rdp/rdp_bitmap.c b/src/protocols/rdp/rdp_bitmap.c index b6c126c7..a7021124 100644 --- a/src/protocols/rdp/rdp_bitmap.c +++ b/src/protocols/rdp/rdp_bitmap.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -72,13 +73,13 @@ BOOL guac_rdp_cache_bitmap(rdpContext* context, rdpBitmap* bitmap) { BOOL guac_rdp_bitmap_new(rdpContext* context, rdpBitmap* bitmap) { /* Convert image data if present */ - if (bitmap->data != NULL && bitmap->bpp != 32) { + if (bitmap->data != NULL && bitmap->format != PIXEL_FORMAT_XRGB32) { /* Allocate sufficient space for converted image */ unsigned char* image_buffer = _aligned_malloc(bitmap->width * bitmap->height * 4, 16); /* Attempt image conversion */ - if (!freerdp_image_copy(image_buffer, PIXEL_FORMAT_ARGB32, 0, 0, 0, + if (!freerdp_image_copy(image_buffer, PIXEL_FORMAT_XRGB32, 0, 0, 0, bitmap->width, bitmap->height, bitmap->data, bitmap->format, 0, 0, 0, &context->gdi->palette, FREERDP_FLIP_NONE)) { _aligned_free(image_buffer); diff --git a/src/protocols/rdp/rdp_color.c b/src/protocols/rdp/rdp_color.c index b2d0d0bc..1d88089d 100644 --- a/src/protocols/rdp/rdp_color.c +++ b/src/protocols/rdp/rdp_color.c @@ -25,6 +25,7 @@ #include #include +#include #include /** diff --git a/src/protocols/rdp/rdp_pointer.c b/src/protocols/rdp/rdp_pointer.c index d475a2c8..99752448 100644 --- a/src/protocols/rdp/rdp_pointer.c +++ b/src/protocols/rdp/rdp_pointer.c @@ -27,6 +27,7 @@ #include #include +#include #include #include