mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-12-14 12:13:30 +08:00
Unified initialization of OrderSupport
Added a library internal function freerdp_settings_set_default_order_support which initializes the OrderSupport array of settings. Now clients no longer need to set this up on their own, if they do not implement their own hardware accelerated order processing.
This commit is contained in:
parent
394bc62869
commit
7d89ea22d4
@ -223,41 +223,15 @@ static BOOL android_pre_connect(freerdp* instance)
|
|||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
rdpSettings* settings;
|
rdpSettings* settings;
|
||||||
BOOL bitmap_cache;
|
|
||||||
|
|
||||||
if (!instance)
|
if (!instance)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
settings = instance->settings;
|
settings = instance->settings;
|
||||||
|
|
||||||
if (!settings || !settings->OrderSupport)
|
if (!settings)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
bitmap_cache = settings->BitmapCacheEnabled;
|
|
||||||
settings->OrderSupport[NEG_DSTBLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_PATBLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_SCRBLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_OPAQUE_RECT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_DRAWNINEGRID_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTIDSTBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTIPATBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTISCRBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTIOPAQUERECT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_MULTI_DRAWNINEGRID_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_LINETO_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_POLYLINE_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_MEMBLT_INDEX] = bitmap_cache;
|
|
||||||
settings->OrderSupport[NEG_MEM3BLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_MEMBLT_V2_INDEX] = bitmap_cache;
|
|
||||||
settings->OrderSupport[NEG_MEM3BLT_V2_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_SAVEBITMAP_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_GLYPH_INDEX_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_FAST_INDEX_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_FAST_GLYPH_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_POLYGON_SC_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_POLYGON_CB_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE;
|
|
||||||
rc = PubSub_SubscribeChannelConnected(
|
rc = PubSub_SubscribeChannelConnected(
|
||||||
instance->context->pubSub,
|
instance->context->pubSub,
|
||||||
android_OnChannelConnectedEventHandler);
|
android_OnChannelConnectedEventHandler);
|
||||||
|
@ -884,32 +884,6 @@ BOOL mac_pre_connect(freerdp* instance)
|
|||||||
|
|
||||||
settings->OsMajorType = OSMAJORTYPE_MACINTOSH;
|
settings->OsMajorType = OSMAJORTYPE_MACINTOSH;
|
||||||
settings->OsMinorType = OSMINORTYPE_MACINTOSH;
|
settings->OsMinorType = OSMINORTYPE_MACINTOSH;
|
||||||
ZeroMemory(settings->OrderSupport, 32);
|
|
||||||
settings->OrderSupport[NEG_DSTBLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_PATBLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_SCRBLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_OPAQUE_RECT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_DRAWNINEGRID_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTIDSTBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTIPATBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTISCRBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTIOPAQUERECT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_MULTI_DRAWNINEGRID_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_LINETO_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_POLYLINE_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_MEMBLT_INDEX] = settings->BitmapCacheEnabled;
|
|
||||||
settings->OrderSupport[NEG_MEM3BLT_INDEX] = (settings->SoftwareGdi) ? TRUE :
|
|
||||||
FALSE;
|
|
||||||
settings->OrderSupport[NEG_MEMBLT_V2_INDEX] = settings->BitmapCacheEnabled;
|
|
||||||
settings->OrderSupport[NEG_MEM3BLT_V2_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_SAVEBITMAP_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_GLYPH_INDEX_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_FAST_INDEX_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_FAST_GLYPH_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_POLYGON_SC_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_POLYGON_CB_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE;
|
|
||||||
PubSub_SubscribeChannelConnected(instance->context->pubSub,
|
PubSub_SubscribeChannelConnected(instance->context->pubSub,
|
||||||
mac_OnChannelConnectedEventHandler);
|
mac_OnChannelConnectedEventHandler);
|
||||||
PubSub_SubscribeChannelDisconnected(instance->context->pubSub,
|
PubSub_SubscribeChannelDisconnected(instance->context->pubSub,
|
||||||
|
@ -107,32 +107,11 @@ static BOOL tf_pre_connect(freerdp* instance)
|
|||||||
/* Optional OS identifier sent to server */
|
/* Optional OS identifier sent to server */
|
||||||
settings->OsMajorType = OSMAJORTYPE_UNIX;
|
settings->OsMajorType = OSMAJORTYPE_UNIX;
|
||||||
settings->OsMinorType = OSMINORTYPE_NATIVE_XSERVER;
|
settings->OsMinorType = OSMINORTYPE_NATIVE_XSERVER;
|
||||||
/* Base protocol feature support mask */
|
|
||||||
ZeroMemory(settings->OrderSupport, 32);
|
/* settings->OrderSupport is initialized at this point.
|
||||||
settings->OrderSupport[NEG_DSTBLT_INDEX] = TRUE;
|
* Only override it if you plan to implement custom order
|
||||||
settings->OrderSupport[NEG_PATBLT_INDEX] = TRUE;
|
* callbacks or deactiveate certain features. */
|
||||||
settings->OrderSupport[NEG_SCRBLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_OPAQUE_RECT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_DRAWNINEGRID_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTIDSTBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTIPATBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTISCRBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTIOPAQUERECT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_MULTI_DRAWNINEGRID_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_LINETO_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_POLYLINE_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_MEMBLT_INDEX] = settings->BitmapCacheEnabled;
|
|
||||||
settings->OrderSupport[NEG_MEM3BLT_INDEX] = settings->BitmapCacheEnabled;
|
|
||||||
settings->OrderSupport[NEG_MEMBLT_V2_INDEX] = settings->BitmapCacheEnabled;
|
|
||||||
settings->OrderSupport[NEG_MEM3BLT_V2_INDEX] = settings->BitmapCacheEnabled;
|
|
||||||
settings->OrderSupport[NEG_SAVEBITMAP_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_GLYPH_INDEX_INDEX] = settings->GlyphSupportLevel != GLYPH_SUPPORT_NONE;
|
|
||||||
settings->OrderSupport[NEG_FAST_INDEX_INDEX] = settings->GlyphSupportLevel != GLYPH_SUPPORT_NONE;
|
|
||||||
settings->OrderSupport[NEG_FAST_GLYPH_INDEX] = settings->GlyphSupportLevel != GLYPH_SUPPORT_NONE;
|
|
||||||
settings->OrderSupport[NEG_POLYGON_SC_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_POLYGON_CB_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE;
|
|
||||||
/* Register the channel listeners.
|
/* Register the channel listeners.
|
||||||
* They are required to set up / tear down channels if they are loaded. */
|
* They are required to set up / tear down channels if they are loaded. */
|
||||||
PubSub_SubscribeChannelConnected(instance->context->pubSub,
|
PubSub_SubscribeChannelConnected(instance->context->pubSub,
|
||||||
|
@ -132,31 +132,6 @@ static BOOL wl_pre_connect(freerdp* instance)
|
|||||||
|
|
||||||
settings->OsMajorType = OSMAJORTYPE_UNIX;
|
settings->OsMajorType = OSMAJORTYPE_UNIX;
|
||||||
settings->OsMinorType = OSMINORTYPE_NATIVE_WAYLAND;
|
settings->OsMinorType = OSMINORTYPE_NATIVE_WAYLAND;
|
||||||
ZeroMemory(settings->OrderSupport, 32);
|
|
||||||
settings->OrderSupport[NEG_DSTBLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_PATBLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_SCRBLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_OPAQUE_RECT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_DRAWNINEGRID_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTIDSTBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTIPATBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTISCRBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTIOPAQUERECT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_MULTI_DRAWNINEGRID_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_LINETO_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_POLYLINE_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_MEMBLT_INDEX] = settings->BitmapCacheEnabled;
|
|
||||||
settings->OrderSupport[NEG_MEM3BLT_INDEX] = settings->BitmapCacheEnabled;
|
|
||||||
settings->OrderSupport[NEG_MEMBLT_V2_INDEX] = settings->BitmapCacheEnabled;
|
|
||||||
settings->OrderSupport[NEG_MEM3BLT_V2_INDEX] = settings->BitmapCacheEnabled;
|
|
||||||
settings->OrderSupport[NEG_SAVEBITMAP_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_GLYPH_INDEX_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_FAST_INDEX_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_FAST_GLYPH_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_POLYGON_SC_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_POLYGON_CB_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE;
|
|
||||||
PubSub_SubscribeChannelConnected(instance->context->pubSub,
|
PubSub_SubscribeChannelConnected(instance->context->pubSub,
|
||||||
wlf_OnChannelConnectedEventHandler);
|
wlf_OnChannelConnectedEventHandler);
|
||||||
PubSub_SubscribeChannelDisconnected(instance->context->pubSub,
|
PubSub_SubscribeChannelDisconnected(instance->context->pubSub,
|
||||||
|
@ -192,30 +192,6 @@ static BOOL wf_pre_connect(freerdp* instance)
|
|||||||
settings = instance->settings;
|
settings = instance->settings;
|
||||||
settings->OsMajorType = OSMAJORTYPE_WINDOWS;
|
settings->OsMajorType = OSMAJORTYPE_WINDOWS;
|
||||||
settings->OsMinorType = OSMINORTYPE_WINDOWS_NT;
|
settings->OsMinorType = OSMINORTYPE_WINDOWS_NT;
|
||||||
settings->OrderSupport[NEG_DSTBLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_PATBLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_SCRBLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_OPAQUE_RECT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_DRAWNINEGRID_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTIDSTBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTIPATBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTISCRBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTIOPAQUERECT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_MULTI_DRAWNINEGRID_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_LINETO_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_POLYLINE_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_MEMBLT_INDEX] = settings->BitmapCacheEnabled;
|
|
||||||
settings->OrderSupport[NEG_MEM3BLT_INDEX] = settings->BitmapCacheEnabled;
|
|
||||||
settings->OrderSupport[NEG_MEMBLT_V2_INDEX] = settings->BitmapCacheEnabled;
|
|
||||||
settings->OrderSupport[NEG_MEM3BLT_V2_INDEX] = settings->BitmapCacheEnabled;
|
|
||||||
settings->OrderSupport[NEG_SAVEBITMAP_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_GLYPH_INDEX_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_FAST_INDEX_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_FAST_GLYPH_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_POLYGON_SC_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_POLYGON_CB_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE;
|
|
||||||
wfc->fullscreen = settings->Fullscreen;
|
wfc->fullscreen = settings->Fullscreen;
|
||||||
wfc->floatbar_active = settings->Floatbar;
|
wfc->floatbar_active = settings->Floatbar;
|
||||||
|
|
||||||
|
@ -1100,31 +1100,6 @@ static BOOL xf_pre_connect(freerdp* instance)
|
|||||||
channels = context->channels;
|
channels = context->channels;
|
||||||
settings->OsMajorType = OSMAJORTYPE_UNIX;
|
settings->OsMajorType = OSMAJORTYPE_UNIX;
|
||||||
settings->OsMinorType = OSMINORTYPE_NATIVE_XSERVER;
|
settings->OsMinorType = OSMINORTYPE_NATIVE_XSERVER;
|
||||||
ZeroMemory(settings->OrderSupport, 32);
|
|
||||||
settings->OrderSupport[NEG_DSTBLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_PATBLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_SCRBLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_OPAQUE_RECT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_DRAWNINEGRID_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTIDSTBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTIPATBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTISCRBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTIOPAQUERECT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_MULTI_DRAWNINEGRID_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_LINETO_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_POLYLINE_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_MEMBLT_INDEX] = settings->BitmapCacheEnabled;
|
|
||||||
settings->OrderSupport[NEG_MEM3BLT_INDEX] = settings->BitmapCacheEnabled;
|
|
||||||
settings->OrderSupport[NEG_MEMBLT_V2_INDEX] = settings->BitmapCacheEnabled;
|
|
||||||
settings->OrderSupport[NEG_MEM3BLT_V2_INDEX] = settings->BitmapCacheEnabled;
|
|
||||||
settings->OrderSupport[NEG_SAVEBITMAP_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_GLYPH_INDEX_INDEX] = settings->GlyphSupportLevel != GLYPH_SUPPORT_NONE;
|
|
||||||
settings->OrderSupport[NEG_FAST_INDEX_INDEX] = settings->GlyphSupportLevel != GLYPH_SUPPORT_NONE;
|
|
||||||
settings->OrderSupport[NEG_FAST_GLYPH_INDEX] = settings->GlyphSupportLevel != GLYPH_SUPPORT_NONE;
|
|
||||||
settings->OrderSupport[NEG_POLYGON_SC_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_POLYGON_CB_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE;
|
|
||||||
PubSub_SubscribeChannelConnected(instance->context->pubSub,
|
PubSub_SubscribeChannelConnected(instance->context->pubSub,
|
||||||
xf_OnChannelConnectedEventHandler);
|
xf_OnChannelConnectedEventHandler);
|
||||||
PubSub_SubscribeChannelDisconnected(instance->context->pubSub,
|
PubSub_SubscribeChannelDisconnected(instance->context->pubSub,
|
||||||
@ -1884,7 +1859,7 @@ static BOOL xfreerdp_client_new(freerdp* instance, rdpContext* context)
|
|||||||
xfc->_NET_WM_WINDOW_TYPE_POPUP = XInternAtom(xfc->display,
|
xfc->_NET_WM_WINDOW_TYPE_POPUP = XInternAtom(xfc->display,
|
||||||
"_NET_WM_WINDOW_TYPE_POPUP", False);
|
"_NET_WM_WINDOW_TYPE_POPUP", False);
|
||||||
xfc->_NET_WM_WINDOW_TYPE_POPUP_MENU = XInternAtom(xfc->display,
|
xfc->_NET_WM_WINDOW_TYPE_POPUP_MENU = XInternAtom(xfc->display,
|
||||||
"_NET_WM_WINDOW_TYPE_POPUP_MENU", False);
|
"_NET_WM_WINDOW_TYPE_POPUP_MENU", False);
|
||||||
xfc->_NET_WM_WINDOW_TYPE_UTILITY = XInternAtom(xfc->display,
|
xfc->_NET_WM_WINDOW_TYPE_UTILITY = XInternAtom(xfc->display,
|
||||||
"_NET_WM_WINDOW_TYPE_UTILITY", False);
|
"_NET_WM_WINDOW_TYPE_UTILITY", False);
|
||||||
xfc->_NET_WM_WINDOW_TYPE_DROPDOWN_MENU = XInternAtom(xfc->display,
|
xfc->_NET_WM_WINDOW_TYPE_DROPDOWN_MENU = XInternAtom(xfc->display,
|
||||||
|
@ -100,9 +100,6 @@ static BOOL ios_pre_connect(freerdp* instance)
|
|||||||
|
|
||||||
settings = instance->settings;
|
settings = instance->settings;
|
||||||
|
|
||||||
if (!settings->OrderSupport)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
settings->AutoLogonEnabled = settings->Password
|
settings->AutoLogonEnabled = settings->Password
|
||||||
&& (strlen(settings->Password) > 0);
|
&& (strlen(settings->Password) > 0);
|
||||||
|
|
||||||
@ -115,31 +112,6 @@ static BOOL ios_pre_connect(freerdp* instance)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL bitmap_cache = settings->BitmapCacheEnabled;
|
|
||||||
settings->OrderSupport[NEG_DSTBLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_PATBLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_SCRBLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_OPAQUE_RECT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_DRAWNINEGRID_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTIDSTBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTIPATBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTISCRBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTIOPAQUERECT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_MULTI_DRAWNINEGRID_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_LINETO_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_POLYLINE_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_MEMBLT_INDEX] = bitmap_cache;
|
|
||||||
settings->OrderSupport[NEG_MEM3BLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_MEMBLT_V2_INDEX] = bitmap_cache;
|
|
||||||
settings->OrderSupport[NEG_MEM3BLT_V2_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_SAVEBITMAP_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_GLYPH_INDEX_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_FAST_INDEX_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_FAST_GLYPH_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_POLYGON_SC_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_POLYGON_CB_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE;
|
|
||||||
rc = PubSub_SubscribeChannelConnected(
|
rc = PubSub_SubscribeChannelConnected(
|
||||||
instance->context->pubSub,
|
instance->context->pubSub,
|
||||||
ios_OnChannelConnectedEventHandler);
|
ios_OnChannelConnectedEventHandler);
|
||||||
|
@ -75,6 +75,7 @@ set(${MODULE_PREFIX}_SRCS
|
|||||||
security.c
|
security.c
|
||||||
security.h
|
security.h
|
||||||
settings.c
|
settings.c
|
||||||
|
settings.h
|
||||||
orders.c
|
orders.c
|
||||||
orders.h
|
orders.h
|
||||||
freerdp.c
|
freerdp.c
|
||||||
|
@ -50,6 +50,8 @@
|
|||||||
#include <freerdp/log.h>
|
#include <freerdp/log.h>
|
||||||
#include <freerdp/cache/pointer.h>
|
#include <freerdp/cache/pointer.h>
|
||||||
|
|
||||||
|
#include "settings.h"
|
||||||
|
|
||||||
#define TAG FREERDP_TAG("core")
|
#define TAG FREERDP_TAG("core")
|
||||||
|
|
||||||
/* connectErrorCode is 'extern' in error.h. See comment there.*/
|
/* connectErrorCode is 'extern' in error.h. See comment there.*/
|
||||||
@ -166,6 +168,10 @@ BOOL freerdp_connect(freerdp* instance)
|
|||||||
ResetEvent(instance->context->abortEvent);
|
ResetEvent(instance->context->abortEvent);
|
||||||
rdp = instance->context->rdp;
|
rdp = instance->context->rdp;
|
||||||
settings = instance->settings;
|
settings = instance->settings;
|
||||||
|
|
||||||
|
if (!freerdp_settings_set_default_order_support(settings))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
IFCALLRET(instance->PreConnect, status, instance);
|
IFCALLRET(instance->PreConnect, status, instance);
|
||||||
instance->ConnectionCallbackState = CLIENT_STATE_PRECONNECT_PASSED;
|
instance->ConnectionCallbackState = CLIENT_STATE_PRECONNECT_PASSED;
|
||||||
|
|
||||||
|
@ -280,6 +280,39 @@ static BOOL settings_get_computer_name(rdpSettings* settings)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOL freerdp_settings_set_default_order_support(rdpSettings* settings)
|
||||||
|
{
|
||||||
|
if (!settings)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
ZeroMemory(settings->OrderSupport, 32);
|
||||||
|
settings->OrderSupport[NEG_DSTBLT_INDEX] = TRUE;
|
||||||
|
settings->OrderSupport[NEG_PATBLT_INDEX] = TRUE;
|
||||||
|
settings->OrderSupport[NEG_SCRBLT_INDEX] = TRUE;
|
||||||
|
settings->OrderSupport[NEG_OPAQUE_RECT_INDEX] = TRUE;
|
||||||
|
settings->OrderSupport[NEG_DRAWNINEGRID_INDEX] = FALSE;
|
||||||
|
settings->OrderSupport[NEG_MULTIDSTBLT_INDEX] = FALSE;
|
||||||
|
settings->OrderSupport[NEG_MULTIPATBLT_INDEX] = FALSE;
|
||||||
|
settings->OrderSupport[NEG_MULTISCRBLT_INDEX] = FALSE;
|
||||||
|
settings->OrderSupport[NEG_MULTIOPAQUERECT_INDEX] = TRUE;
|
||||||
|
settings->OrderSupport[NEG_MULTI_DRAWNINEGRID_INDEX] = FALSE;
|
||||||
|
settings->OrderSupport[NEG_LINETO_INDEX] = TRUE;
|
||||||
|
settings->OrderSupport[NEG_POLYLINE_INDEX] = TRUE;
|
||||||
|
settings->OrderSupport[NEG_MEMBLT_INDEX] = settings->BitmapCacheEnabled;
|
||||||
|
settings->OrderSupport[NEG_MEM3BLT_INDEX] = settings->BitmapCacheEnabled;
|
||||||
|
settings->OrderSupport[NEG_MEMBLT_V2_INDEX] = settings->BitmapCacheEnabled;
|
||||||
|
settings->OrderSupport[NEG_MEM3BLT_V2_INDEX] = settings->BitmapCacheEnabled;
|
||||||
|
settings->OrderSupport[NEG_SAVEBITMAP_INDEX] = FALSE;
|
||||||
|
settings->OrderSupport[NEG_GLYPH_INDEX_INDEX] = settings->GlyphSupportLevel != GLYPH_SUPPORT_NONE;
|
||||||
|
settings->OrderSupport[NEG_FAST_INDEX_INDEX] = settings->GlyphSupportLevel != GLYPH_SUPPORT_NONE;
|
||||||
|
settings->OrderSupport[NEG_FAST_GLYPH_INDEX] = settings->GlyphSupportLevel != GLYPH_SUPPORT_NONE;
|
||||||
|
settings->OrderSupport[NEG_POLYGON_SC_INDEX] = FALSE;
|
||||||
|
settings->OrderSupport[NEG_POLYGON_CB_INDEX] = FALSE;
|
||||||
|
settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = FALSE;
|
||||||
|
settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
rdpSettings* freerdp_settings_new(DWORD flags)
|
rdpSettings* freerdp_settings_new(DWORD flags)
|
||||||
{
|
{
|
||||||
char* base;
|
char* base;
|
||||||
@ -381,33 +414,6 @@ rdpSettings* freerdp_settings_new(DWORD flags)
|
|||||||
if (!settings->ReceivedCapabilities)
|
if (!settings->ReceivedCapabilities)
|
||||||
goto out_fail;
|
goto out_fail;
|
||||||
|
|
||||||
settings->OrderSupport = calloc(1, 32);
|
|
||||||
|
|
||||||
if (!settings->OrderSupport)
|
|
||||||
goto out_fail;
|
|
||||||
|
|
||||||
settings->OrderSupport[NEG_DSTBLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_PATBLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_SCRBLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_OPAQUE_RECT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_DRAWNINEGRID_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_MULTIDSTBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTIPATBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTISCRBLT_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_MULTIOPAQUERECT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_MULTI_DRAWNINEGRID_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_LINETO_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_POLYLINE_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_MEMBLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_MEM3BLT_INDEX] = TRUE;
|
|
||||||
settings->OrderSupport[NEG_SAVEBITMAP_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_GLYPH_INDEX_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_FAST_INDEX_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_FAST_GLYPH_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_POLYGON_SC_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_POLYGON_CB_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = FALSE;
|
|
||||||
settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE;
|
|
||||||
settings->ClientProductId = calloc(1, 32);
|
settings->ClientProductId = calloc(1, 32);
|
||||||
|
|
||||||
if (!settings->ClientProductId)
|
if (!settings->ClientProductId)
|
||||||
@ -617,6 +623,14 @@ rdpSettings* freerdp_settings_new(DWORD flags)
|
|||||||
settings->ActionScript = _strdup("~/.config/freerdp/action.sh");
|
settings->ActionScript = _strdup("~/.config/freerdp/action.sh");
|
||||||
settings->SmartcardLogon = FALSE;
|
settings->SmartcardLogon = FALSE;
|
||||||
settings->TlsSecLevel = 1;
|
settings->TlsSecLevel = 1;
|
||||||
|
settings->OrderSupport = calloc(1, 32);
|
||||||
|
|
||||||
|
if (!settings->OrderSupport)
|
||||||
|
goto out_fail;
|
||||||
|
|
||||||
|
if (!freerdp_settings_set_default_order_support(settings))
|
||||||
|
goto out_fail;
|
||||||
|
|
||||||
return settings;
|
return settings;
|
||||||
out_fail:
|
out_fail:
|
||||||
free(settings->HomePath);
|
free(settings->HomePath);
|
||||||
|
30
libfreerdp/core/settings.h
Normal file
30
libfreerdp/core/settings.h
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/**
|
||||||
|
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||||
|
* Internal settings header for functions not exported
|
||||||
|
*
|
||||||
|
* Copyright 2018 Armin Novak <armin.novak@thincast.com>
|
||||||
|
* Copyright 2018 Thincast Technologies GmbH
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef FREERDP_LIB_CORE_SETTINGS_H
|
||||||
|
#define FREERDP_LIB_CORE_SETTINGS_H
|
||||||
|
|
||||||
|
#include <freerdp/types.h>
|
||||||
|
#include <freerdp/settings.h>
|
||||||
|
#include <freerdp/api.h>
|
||||||
|
|
||||||
|
FREERDP_LOCAL BOOL freerdp_settings_set_default_order_support(rdpSettings* settings);
|
||||||
|
|
||||||
|
#endif /* FREERDP_LIB_CORE_SETTINGS_H */
|
Loading…
Reference in New Issue
Block a user