From 14fedacfc720830c1622655ef687f00017599a1a Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 18 Jul 2013 16:20:40 -0700 Subject: [PATCH] Finally working compile. --- configure.ac | 9 +++++++++ src/protocols/rdp/rdp_gdi.c | 4 ++++ src/protocols/rdp/rdp_glyph.c | 4 ++-- src/protocols/rdp/rdp_settings.h | 2 ++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 429650fd..c3e684a1 100644 --- a/configure.ac +++ b/configure.ac @@ -363,6 +363,15 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include rdpBitmap b = { .Decompress = __decompress };]])],, [AC_DEFINE([LEGACY_RDPBITMAP])]) +# +# FreeRDP: rdpPalette +# + +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include + rdpPalette p; + PALETTE_ENTRY* foo = p.entries;]])],, + [AC_DEFINE([LEGACY_RDPPALETTE])]) + # # FreeRDP: wMessage / RDP_EVENT # diff --git a/src/protocols/rdp/rdp_gdi.c b/src/protocols/rdp/rdp_gdi.c index 6c3b5c7b..7d8e99a9 100644 --- a/src/protocols/rdp/rdp_gdi.c +++ b/src/protocols/rdp/rdp_gdi.c @@ -462,7 +462,11 @@ void guac_rdp_gdi_palette_update(rdpContext* context, PALETTE_UPDATE* palette) { CLRCONV* clrconv = ((rdp_freerdp_context*) context)->clrconv; clrconv->palette->count = palette->number; +#ifdef LEGACY_RDPPALETTE clrconv->palette->entries = palette->entries; +#else + memcpy(clrconv->palette->entries, palette->entries, sizeof(palette->entries)); +#endif } diff --git a/src/protocols/rdp/rdp_glyph.c b/src/protocols/rdp/rdp_glyph.c index 7d784d38..33dae379 100644 --- a/src/protocols/rdp/rdp_glyph.c +++ b/src/protocols/rdp/rdp_glyph.c @@ -145,7 +145,7 @@ void guac_rdp_glyph_begindraw(rdpContext* context, /* Convert foreground color */ fgcolor = freerdp_color_convert_var(fgcolor, - context->instance->settings->color_depth, 32, + guac_client_data->settings.color_depth, 32, ((rdp_freerdp_context*) context)->clrconv); /* Fill background with color if specified */ @@ -161,7 +161,7 @@ void guac_rdp_glyph_begindraw(rdpContext* context, /* Convert background color */ bgcolor = freerdp_color_convert_var(bgcolor, - context->instance->settings->color_depth, 32, + guac_client_data->settings.color_depth, 32, ((rdp_freerdp_context*) context)->clrconv); /* Fill background */ diff --git a/src/protocols/rdp/rdp_settings.h b/src/protocols/rdp/rdp_settings.h index 32159595..57b9e2eb 100644 --- a/src/protocols/rdp/rdp_settings.h +++ b/src/protocols/rdp/rdp_settings.h @@ -41,6 +41,8 @@ #include #include +#include "rdp_keymap.h" + /** * The default RDP port. */