From 9a8363e0baa3eb8fc45f7620f2ede23e9af9033c Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 5 Nov 2013 12:34:36 -0800 Subject: [PATCH] Test for fastpath settings. --- configure.ac | 15 +++++++++++++++ src/protocols/rdp/rdp_settings.c | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/configure.ac b/configure.ac index 40d4ef78..3dee95d6 100644 --- a/configure.ac +++ b/configure.ac @@ -263,6 +263,7 @@ have_winpr=yes have_freerdp=yes legacy_freerdp_extensions=no rdpsettings_interface=unknown +rdpsettings_fastpath=yes freerdp_interface=unknown event_interface=unknown RDP_LIBS= @@ -422,6 +423,8 @@ fi # Check for current (as of 1.1) rdpSettings interface AC_CHECK_MEMBERS([rdpSettings.Width, rdpSettings.Height, + rdpSettings.FastPathInput, + rdpSettings.FastPathOutput, rdpSettings.OrderSupport], [rdpsettings_interface=stable],, [[#include ]]) @@ -439,6 +442,13 @@ fi # Set defines based on interface type, warn if unknown if test "x${rdpsettings_interface}" = "xlegacy"; then AC_DEFINE([LEGACY_RDPSETTINGS]) + + # Legacy interface may not have FastPath settings + AC_CHECK_MEMBERS([rdpSettings.fast_path_input, + rdpSettings.fast_path_output],, + [rdpsettings_fastpath=no], + [[#include ]]) + elif test "x${rdpsettings_interface}" = "xunknown"; then AC_MSG_WARN([ -------------------------------------------- @@ -448,6 +458,11 @@ elif test "x${rdpsettings_interface}" = "xunknown"; then have_freerdp=no fi +# Activate FastPath settings if present +if test "x${rdpsettings_fastpath}" = "xyes"; then + AC_DEFINE([HAVE_RDPSETTINGS_FASTPATH]) +fi + # # FreeRDP: rdpBitmap # diff --git a/src/protocols/rdp/rdp_settings.c b/src/protocols/rdp/rdp_settings.c index 2de44252..33a5d234 100644 --- a/src/protocols/rdp/rdp_settings.c +++ b/src/protocols/rdp/rdp_settings.c @@ -186,8 +186,10 @@ void guac_rdp_push_settings(guac_rdp_settings* guac_settings, freerdp* rdp) { bitmap_cache = rdp_settings->bitmap_cache; rdp_settings->os_major_type = OSMAJORTYPE_UNSPECIFIED; rdp_settings->os_minor_type = OSMINORTYPE_UNSPECIFIED; +#ifdef HAVE_RDPSETTINGS_FASTPATH rdp_settings->fast_path_input = FALSE; rdp_settings->fast_path_output = FALSE; +#endif rdp_settings->order_support[NEG_DSTBLT_INDEX] = TRUE; rdp_settings->order_support[NEG_PATBLT_INDEX] = FALSE; /* PATBLT not yet supported */ rdp_settings->order_support[NEG_SCRBLT_INDEX] = TRUE; @@ -216,8 +218,10 @@ void guac_rdp_push_settings(guac_rdp_settings* guac_settings, freerdp* rdp) { bitmap_cache = rdp_settings->BitmapCacheEnabled; rdp_settings->OsMajorType = OSMAJORTYPE_UNSPECIFIED; rdp_settings->OsMinorType = OSMINORTYPE_UNSPECIFIED; +#ifdef HAVE_RDPSETTINGS_FASTPATH rdp_settings->FastPathInput = FALSE; rdp_settings->FastPathOutput = FALSE; +#endif rdp_settings->OrderSupport[NEG_DSTBLT_INDEX] = TRUE; rdp_settings->OrderSupport[NEG_PATBLT_INDEX] = FALSE; /* PATBLT not yet supported */ rdp_settings->OrderSupport[NEG_SCRBLT_INDEX] = TRUE;