diff --git a/include/freerdp/settings.h b/include/freerdp/settings.h index aad4741c3..915202cb8 100644 --- a/include/freerdp/settings.h +++ b/include/freerdp/settings.h @@ -35,6 +35,14 @@ #define PERF_ENABLE_FONT_SMOOTHING 0x00000080 #define PERF_ENABLE_DESKTOP_COMPOSITION 0x00000100 +/* Connection Types */ +#define CONNECTION_TYPE_MODEM 0x01 +#define CONNECTION_TYPE_BROADBAND_LOW 0x02 +#define CONNECTION_TYPE_SATELLITE 0x03 +#define CONNECTION_TYPE_BROADBAND_HIGH 0x04 +#define CONNECTION_TYPE_WAN 0x05 +#define CONNECTION_TYPE_LAN 0x06 + /* Encryption Methods */ #define ENCRYPTION_METHOD_NONE 0x00000000 #define ENCRYPTION_METHOD_40BIT 0x00000001 @@ -279,6 +287,7 @@ struct rdp_settings boolean disable_full_window_drag; boolean disable_menu_animations; boolean disable_theming; + uint32 connection_type; uint32 multifrag_max_request_size; /* Certificate */ diff --git a/libfreerdp-core/gcc.c b/libfreerdp-core/gcc.c index baadabe58..bf098685c 100644 --- a/libfreerdp-core/gcc.c +++ b/libfreerdp-core/gcc.c @@ -660,14 +660,14 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings *settings) RNS_UD_16BPP_SUPPORT | RNS_UD_15BPP_SUPPORT; - connectionType = 0; + connectionType = settings->connection_type; earlyCapabilityFlags = RNS_UD_CS_SUPPORT_ERRINFO_PDU; if (settings->rfx_codec) - { - earlyCapabilityFlags |= RNS_UD_CS_VALID_CONNECTION_TYPE; connectionType = CONNECTION_TYPE_LAN; - } + + if (connectionType != 0) + earlyCapabilityFlags |= RNS_UD_CS_VALID_CONNECTION_TYPE; if (settings->color_depth == 32) { diff --git a/libfreerdp-core/gcc.h b/libfreerdp-core/gcc.h index 8d6d598ea..f93b33766 100644 --- a/libfreerdp-core/gcc.h +++ b/libfreerdp-core/gcc.h @@ -24,6 +24,7 @@ #include "mcs.h" #include +#include #include /* Client to Server (CS) data blocks */ @@ -66,26 +67,6 @@ #define RNS_UD_CS_VALID_CONNECTION_TYPE 0x0020 #define RNS_UD_CS_SUPPORT_MONITOR_LAYOUT_PDU 0x0040 -/* Performance Flags */ -#define PERF_FLAG_NONE 0x00000000 -#define PERF_DISABLE_WALLPAPER 0x00000001 -#define PERF_DISABLE_FULLWINDOWDRAG 0x00000002 -#define PERF_DISABLE_MENUANIMATIONS 0x00000004 -#define PERF_DISABLE_THEMING 0x00000008 -#define PERF_RESERVED1 0x00000010 -#define PERF_DISABLE_CURSOR_SHADOW 0x00000020 -#define PERF_DISABLE_CURSORSETTINGS 0x00000040 -#define PERF_ENABLE_FONT_SMOOTHING 0x00000080 -#define PERF_ENABLE_DESKTOP_COMPOSITION 0x00000100 - -/* Connection Types */ -#define CONNECTION_TYPE_MODEM 0x01 -#define CONNECTION_TYPE_BROADBAND_LOW 0x02 -#define CONNECTION_TYPE_SATELLITE 0x03 -#define CONNECTION_TYPE_BROADBAND_HIGH 0x04 -#define CONNECTION_TYPE_WAN 0x05 -#define CONNECTION_TYPE_LAN 0x06 - /* Cluster Information Flags */ #define REDIRECTION_SUPPORTED 0x00000001 #define REDIRECTED_SESSIONID_FIELD_VALID 0x00000002 diff --git a/libfreerdp-core/settings.c b/libfreerdp-core/settings.c index cf47cb55e..0014b4f6c 100644 --- a/libfreerdp-core/settings.c +++ b/libfreerdp-core/settings.c @@ -101,6 +101,7 @@ rdpSettings* settings_new(void* instance) settings->disable_full_window_drag = false; settings->disable_menu_animations = false; settings->disable_theming = false; + settings->connection_type = 0; settings->draw_gdi_plus = false; diff --git a/libfreerdp-utils/args.c b/libfreerdp-utils/args.c index 8d306359a..0baa42892 100644 --- a/libfreerdp-utils/args.c +++ b/libfreerdp-utils/args.c @@ -436,14 +436,18 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, settings->performance_flags = PERF_DISABLE_WALLPAPER | PERF_DISABLE_FULLWINDOWDRAG | PERF_DISABLE_MENUANIMATIONS | PERF_DISABLE_THEMING; + + settings->connection_type = CONNECTION_TYPE_MODEM; } else if (argv[index][0] == 'b') /* broadband */ { settings->performance_flags = PERF_DISABLE_WALLPAPER; + settings->connection_type = CONNECTION_TYPE_BROADBAND_HIGH; } else if (argv[index][0] == 'l') /* lan */ { settings->performance_flags = PERF_FLAG_NONE; + settings->connection_type = CONNECTION_TYPE_LAN; } else {