From fc6758ffdfd4aa1270fb83f0be1c945454e857cc Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 20 Nov 2014 16:45:10 -0800 Subject: [PATCH] GUAC-852: Use freerdp_convert_gdi_order_color() for color conversion. --- src/protocols/rdp/rdp_glyph.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/protocols/rdp/rdp_glyph.c b/src/protocols/rdp/rdp_glyph.c index 403cc9e1..eadfae48 100644 --- a/src/protocols/rdp/rdp_glyph.c +++ b/src/protocols/rdp/rdp_glyph.c @@ -135,9 +135,9 @@ void guac_rdp_glyph_begindraw(rdpContext* context, if (width != 0 && height != 0) { /* Convert background color */ - bgcolor = freerdp_color_convert_var(bgcolor, - guac_rdp_get_depth(context->instance), 32, - ((rdp_freerdp_context*) context)->clrconv); + bgcolor = freerdp_convert_gdi_order_color(bgcolor, + guac_rdp_get_depth(context->instance), + PIXEL_FORMAT_ARGB32, NULL); guac_common_surface_rect(guac_client_data->current_surface, x, y, width, height, (bgcolor & 0xFF0000) >> 16, @@ -147,8 +147,10 @@ void guac_rdp_glyph_begindraw(rdpContext* context, } /* Convert foreground color */ - guac_client_data->glyph_color = freerdp_color_convert_var(fgcolor, - guac_rdp_get_depth(context->instance), 32, ((rdp_freerdp_context*) context)->clrconv); + guac_client_data->glyph_color = + freerdp_convert_gdi_order_color(fgcolor, + guac_rdp_get_depth(context->instance), + PIXEL_FORMAT_ARGB32, NULL); }