libfreerdp-core: started refactoring rdpSettings
This commit is contained in:
parent
d4045895ef
commit
ebc09d17d8
@ -339,8 +339,8 @@ void xf_gdi_patblt(rdpContext* context, PATBLT_ORDER* patblt)
|
||||
brush = &patblt->brush;
|
||||
xf_set_rop3(xfi, gdi_rop3_code(patblt->bRop));
|
||||
|
||||
foreColor = freerdp_color_convert_rgb(patblt->foreColor, context_->settings->color_depth, xfi->bpp, xfi->clrconv);
|
||||
backColor = freerdp_color_convert_rgb(patblt->backColor, context_->settings->color_depth, xfi->bpp, xfi->clrconv);
|
||||
foreColor = freerdp_color_convert_rgb(patblt->foreColor, context_->settings->ColorDepth, xfi->bpp, xfi->clrconv);
|
||||
backColor = freerdp_color_convert_rgb(patblt->backColor, context_->settings->ColorDepth, xfi->bpp, xfi->clrconv);
|
||||
|
||||
if (brush->style == GDI_BS_SOLID)
|
||||
{
|
||||
@ -444,7 +444,7 @@ void xf_gdi_opaque_rect(rdpContext* context, OPAQUE_RECT_ORDER* opaque_rect)
|
||||
xfContext* context_ = (xfContext*) context;
|
||||
xfInfo* xfi = context_->xfi;
|
||||
|
||||
color = freerdp_color_convert_var(opaque_rect->color, context_->settings->color_depth, xfi->bpp, xfi->clrconv);
|
||||
color = freerdp_color_convert_var(opaque_rect->color, context_->settings->ColorDepth, xfi->bpp, xfi->clrconv);
|
||||
|
||||
XSetFunction(xfi->display, xfi->gc, GXcopy);
|
||||
XSetFillStyle(xfi->display, xfi->gc, FillSolid);
|
||||
@ -475,7 +475,7 @@ void xf_gdi_multi_opaque_rect(rdpContext* context, MULTI_OPAQUE_RECT_ORDER* mult
|
||||
xfContext* context_ = (xfContext*) context;
|
||||
xfInfo* xfi = context_->xfi;
|
||||
|
||||
color = freerdp_color_convert_var(multi_opaque_rect->color, context_->settings->color_depth, xfi->bpp, xfi->clrconv);
|
||||
color = freerdp_color_convert_var(multi_opaque_rect->color, context_->settings->ColorDepth, xfi->bpp, xfi->clrconv);
|
||||
|
||||
XSetFunction(xfi->display, xfi->gc, GXcopy);
|
||||
XSetFillStyle(xfi->display, xfi->gc, FillSolid);
|
||||
@ -514,7 +514,7 @@ void xf_gdi_line_to(rdpContext* context, LINE_TO_ORDER* line_to)
|
||||
xfInfo* xfi = context_->xfi;
|
||||
|
||||
xf_set_rop2(xfi, line_to->bRop2);
|
||||
color = freerdp_color_convert_rgb(line_to->penColor, context_->settings->color_depth, xfi->bpp, xfi->clrconv);
|
||||
color = freerdp_color_convert_rgb(line_to->penColor, context_->settings->ColorDepth, xfi->bpp, xfi->clrconv);
|
||||
|
||||
XSetFillStyle(xfi->display, xfi->gc, FillSolid);
|
||||
XSetForeground(xfi->display, xfi->gc, color);
|
||||
@ -562,7 +562,7 @@ void xf_gdi_polyline(rdpContext* context, POLYLINE_ORDER* polyline)
|
||||
xfInfo* xfi = context_->xfi;
|
||||
|
||||
xf_set_rop2(xfi, polyline->bRop2);
|
||||
color = freerdp_color_convert_var(polyline->penColor, context_->settings->color_depth, xfi->bpp, xfi->clrconv);
|
||||
color = freerdp_color_convert_var(polyline->penColor, context_->settings->ColorDepth, xfi->bpp, xfi->clrconv);
|
||||
|
||||
XSetFillStyle(xfi->display, xfi->gc, FillSolid);
|
||||
XSetForeground(xfi->display, xfi->gc, color);
|
||||
@ -651,8 +651,8 @@ void xf_gdi_mem3blt(rdpContext* context, MEM3BLT_ORDER* mem3blt)
|
||||
brush = &mem3blt->brush;
|
||||
bitmap = (xfBitmap*) mem3blt->bitmap;
|
||||
xf_set_rop3(xfi, gdi_rop3_code(mem3blt->bRop));
|
||||
foreColor = freerdp_color_convert_rgb(mem3blt->foreColor, context_->settings->color_depth, xfi->bpp, xfi->clrconv);
|
||||
backColor = freerdp_color_convert_rgb(mem3blt->backColor, context_->settings->color_depth, xfi->bpp, xfi->clrconv);
|
||||
foreColor = freerdp_color_convert_rgb(mem3blt->foreColor, context_->settings->ColorDepth, xfi->bpp, xfi->clrconv);
|
||||
backColor = freerdp_color_convert_rgb(mem3blt->backColor, context_->settings->ColorDepth, xfi->bpp, xfi->clrconv);
|
||||
|
||||
if (brush->style == GDI_BS_PATTERN)
|
||||
{
|
||||
@ -721,7 +721,7 @@ void xf_gdi_polygon_sc(rdpContext* context, POLYGON_SC_ORDER* polygon_sc)
|
||||
xfInfo* xfi = ((xfContext*) context)->xfi;
|
||||
|
||||
xf_set_rop2(xfi, polygon_sc->bRop2);
|
||||
brush_color = freerdp_color_convert_var(polygon_sc->brushColor, ((xfContext*)context)->settings->color_depth, xfi->bpp, xfi->clrconv);
|
||||
brush_color = freerdp_color_convert_var(polygon_sc->brushColor, ((xfContext*)context)->settings->ColorDepth, xfi->bpp, xfi->clrconv);
|
||||
|
||||
npoints = polygon_sc->numPoints + 1;
|
||||
points = malloc(sizeof(XPoint) * npoints);
|
||||
@ -778,8 +778,8 @@ void xf_gdi_polygon_cb(rdpContext* context, POLYGON_CB_ORDER* polygon_cb)
|
||||
|
||||
brush = &(polygon_cb->brush);
|
||||
xf_set_rop2(xfi, polygon_cb->bRop2);
|
||||
foreColor = freerdp_color_convert_rgb(polygon_cb->foreColor, ((xfContext*)context)->settings->color_depth, xfi->bpp, xfi->clrconv);
|
||||
backColor = freerdp_color_convert_rgb(polygon_cb->backColor, ((xfContext*)context)->settings->color_depth, xfi->bpp, xfi->clrconv);
|
||||
foreColor = freerdp_color_convert_rgb(polygon_cb->foreColor, ((xfContext*) context)->settings->ColorDepth, xfi->bpp, xfi->clrconv);
|
||||
backColor = freerdp_color_convert_rgb(polygon_cb->backColor, ((xfContext*) context)->settings->ColorDepth, xfi->bpp, xfi->clrconv);
|
||||
|
||||
npoints = polygon_cb->numPoints + 1;
|
||||
points = malloc(sizeof(XPoint) * npoints);
|
||||
|
@ -50,7 +50,7 @@ void xf_Bitmap_New(rdpContext* context, rdpBitmap* bitmap)
|
||||
if (bitmap->data != NULL)
|
||||
{
|
||||
data = freerdp_image_convert(bitmap->data, NULL,
|
||||
bitmap->width, bitmap->height, context_->settings->color_depth, xfi->bpp, xfi->clrconv);
|
||||
bitmap->width, bitmap->height, context_->settings->ColorDepth, xfi->bpp, xfi->clrconv);
|
||||
|
||||
if (bitmap->ephemeral != TRUE)
|
||||
{
|
||||
@ -338,12 +338,12 @@ void xf_Glyph_BeginDraw(rdpContext* context, int x, int y, int width, int height
|
||||
xfInfo* xfi = context_->xfi;
|
||||
|
||||
bgcolor = (xfi->clrconv->invert)?
|
||||
freerdp_color_convert_var_bgr(bgcolor, context_->settings->color_depth, xfi->bpp, xfi->clrconv):
|
||||
freerdp_color_convert_var_rgb(bgcolor, context_->settings->color_depth, xfi->bpp, xfi->clrconv);
|
||||
freerdp_color_convert_var_bgr(bgcolor, context_->settings->ColorDepth, xfi->bpp, xfi->clrconv):
|
||||
freerdp_color_convert_var_rgb(bgcolor, context_->settings->ColorDepth, xfi->bpp, xfi->clrconv);
|
||||
|
||||
fgcolor = (xfi->clrconv->invert)?
|
||||
freerdp_color_convert_var_bgr(fgcolor, context_->settings->color_depth, xfi->bpp, xfi->clrconv):
|
||||
freerdp_color_convert_var_rgb(fgcolor, context_->settings->color_depth, xfi->bpp, xfi->clrconv);
|
||||
freerdp_color_convert_var_bgr(fgcolor, context_->settings->ColorDepth, xfi->bpp, xfi->clrconv):
|
||||
freerdp_color_convert_var_rgb(fgcolor, context_->settings->ColorDepth, xfi->bpp, xfi->clrconv);
|
||||
|
||||
XSetFunction(xfi->display, xfi->gc, GXcopy);
|
||||
XSetFillStyle(xfi->display, xfi->gc, FillSolid);
|
||||
|
@ -33,9 +33,9 @@
|
||||
void xf_kbd_init(xfInfo* xfi)
|
||||
{
|
||||
xf_kbd_clear(xfi);
|
||||
xfi->keyboard_layout_id = xfi->instance->settings->kbd_layout;
|
||||
xfi->keyboard_layout_id = xfi->instance->settings->KeyboardLayout;
|
||||
xfi->keyboard_layout_id = freerdp_keyboard_init(xfi->keyboard_layout_id);
|
||||
xfi->instance->settings->kbd_layout = xfi->keyboard_layout_id;
|
||||
xfi->instance->settings->KeyboardLayout = xfi->keyboard_layout_id;
|
||||
}
|
||||
|
||||
void xf_kbd_clear(xfInfo* xfi)
|
||||
|
@ -57,18 +57,18 @@ BOOL xf_detect_monitors(xfInfo* xfi, rdpSettings* settings)
|
||||
|
||||
if (settings->fullscreen)
|
||||
{
|
||||
settings->width = WidthOfScreen(xfi->screen);
|
||||
settings->height = HeightOfScreen(xfi->screen);
|
||||
settings->DesktopWidth = WidthOfScreen(xfi->screen);
|
||||
settings->DesktopHeight = HeightOfScreen(xfi->screen);
|
||||
}
|
||||
else if (settings->workarea)
|
||||
{
|
||||
settings->width = xfi->workArea.width;
|
||||
settings->height = xfi->workArea.height;
|
||||
settings->DesktopWidth = xfi->workArea.width;
|
||||
settings->DesktopHeight = xfi->workArea.height;
|
||||
}
|
||||
else if (settings->percent_screen)
|
||||
{
|
||||
settings->width = (xfi->workArea.width * settings->percent_screen) / 100;
|
||||
settings->height = (xfi->workArea.height * settings->percent_screen) / 100;
|
||||
settings->DesktopWidth = (xfi->workArea.width * settings->percent_screen) / 100;
|
||||
settings->DesktopHeight = (xfi->workArea.height * settings->percent_screen) / 100;
|
||||
}
|
||||
|
||||
if (settings->fullscreen != TRUE && settings->workarea != TRUE)
|
||||
@ -121,20 +121,20 @@ BOOL xf_detect_monitors(xfInfo* xfi, rdpSettings* settings)
|
||||
vscreen->area.bottom = MAX(vscreen->monitors[i].area.bottom, vscreen->area.bottom);
|
||||
}
|
||||
|
||||
//if no monitor information is present then make sure variables are set accordingly
|
||||
/* if no monitor information is present then make sure variables are set accordingly */
|
||||
if (settings->num_monitors == 0)
|
||||
{
|
||||
vscreen->area.left = 0;
|
||||
vscreen->area.right = settings->width -1;
|
||||
vscreen->area.right = settings->DesktopWidth -1;
|
||||
vscreen->area.top = 0;
|
||||
vscreen->area.bottom = settings->height - 1;
|
||||
vscreen->area.bottom = settings->DesktopHeight - 1;
|
||||
}
|
||||
|
||||
|
||||
if (settings->num_monitors)
|
||||
{
|
||||
settings->width = vscreen->area.right - vscreen->area.left + 1;
|
||||
settings->height = vscreen->area.bottom - vscreen->area.top + 1;
|
||||
settings->DesktopWidth = vscreen->area.right - vscreen->area.left + 1;
|
||||
settings->DesktopHeight = vscreen->area.bottom - vscreen->area.top + 1;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
@ -237,11 +237,11 @@ void xf_hw_desktop_resize(rdpContext* context)
|
||||
|
||||
if (xfi->fullscreen != TRUE)
|
||||
{
|
||||
xfi->width = settings->width;
|
||||
xfi->height = settings->height;
|
||||
xfi->width = settings->DesktopWidth;
|
||||
xfi->height = settings->DesktopHeight;
|
||||
|
||||
if (xfi->window)
|
||||
xf_ResizeDesktopWindow(xfi, xfi->window, settings->width, settings->height);
|
||||
xf_ResizeDesktopWindow(xfi, xfi->window, settings->DesktopWidth, settings->DesktopHeight);
|
||||
|
||||
if (xfi->primary)
|
||||
{
|
||||
@ -748,7 +748,7 @@ BOOL xf_post_connect(freerdp* instance)
|
||||
}
|
||||
else
|
||||
{
|
||||
xfi->srcBpp = instance->settings->color_depth;
|
||||
xfi->srcBpp = instance->settings->ColorDepth;
|
||||
xf_gdi_register_update_callbacks(instance->update);
|
||||
|
||||
xfi->hdc = gdi_CreateDC(xfi->clrconv, xfi->bpp);
|
||||
@ -775,8 +775,8 @@ BOOL xf_post_connect(freerdp* instance)
|
||||
nsc_context_set_cpu_opt(nsc_context, cpu);
|
||||
#endif
|
||||
|
||||
xfi->width = instance->settings->width;
|
||||
xfi->height = instance->settings->height;
|
||||
xfi->width = instance->settings->DesktopWidth;
|
||||
xfi->height = instance->settings->DesktopHeight;
|
||||
|
||||
xf_create_window(xfi);
|
||||
|
||||
|
@ -259,11 +259,11 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
|
||||
}
|
||||
CommandLineSwitchCase(arg, "w")
|
||||
{
|
||||
settings->width = atoi(arg->Value);
|
||||
settings->DesktopWidth = atoi(arg->Value);
|
||||
}
|
||||
CommandLineSwitchCase(arg, "h")
|
||||
{
|
||||
settings->height = atoi(arg->Value);
|
||||
settings->DesktopHeight = atoi(arg->Value);
|
||||
}
|
||||
CommandLineSwitchCase(arg, "size")
|
||||
{
|
||||
@ -274,8 +274,8 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
|
||||
if (p)
|
||||
{
|
||||
*p = '\0';
|
||||
settings->width = atoi(str);
|
||||
settings->height = atoi(&p[1]);
|
||||
settings->DesktopWidth = atoi(str);
|
||||
settings->DesktopHeight = atoi(&p[1]);
|
||||
}
|
||||
|
||||
free(str);
|
||||
@ -298,7 +298,7 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
|
||||
}
|
||||
CommandLineSwitchCase(arg, "bpp")
|
||||
{
|
||||
settings->color_depth = atoi(arg->Value);
|
||||
settings->ColorDepth = atoi(arg->Value);
|
||||
}
|
||||
CommandLineSwitchCase(arg, "u")
|
||||
{
|
||||
@ -426,7 +426,7 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
|
||||
{
|
||||
settings->rfx_codec = TRUE;
|
||||
settings->fastpath_output = TRUE;
|
||||
settings->color_depth = 32;
|
||||
settings->ColorDepth = 32;
|
||||
settings->performance_flags = PERF_FLAG_NONE;
|
||||
settings->large_pointer = TRUE;
|
||||
}
|
||||
|
@ -510,11 +510,11 @@ BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, rdpSettings*
|
||||
if (~((size_t) file->FullAddress))
|
||||
settings->hostname = file->FullAddress;
|
||||
if (~file->DesktopWidth)
|
||||
settings->width = file->DesktopWidth;
|
||||
settings->DesktopWidth = file->DesktopWidth;
|
||||
if (~file->DesktopHeight)
|
||||
settings->height = file->DesktopHeight;
|
||||
settings->DesktopHeight = file->DesktopHeight;
|
||||
if (~file->SessionBpp)
|
||||
settings->color_depth = file->SessionBpp;
|
||||
settings->ColorDepth = file->SessionBpp;
|
||||
if (~file->ConnectToConsole)
|
||||
settings->console_session = file->ConnectToConsole;
|
||||
if (~file->AdministrativeSession)
|
||||
|
@ -187,6 +187,13 @@ typedef struct rdp_key rdpKey;
|
||||
|
||||
/* Channels */
|
||||
|
||||
struct _RDPDR_DRIVE
|
||||
{
|
||||
char* name;
|
||||
char* path;
|
||||
};
|
||||
typedef struct _RDPDR_DRIVE RDPDR_DRIVE;
|
||||
|
||||
struct rdp_channel
|
||||
{
|
||||
char name[8]; /* ui sets */
|
||||
@ -256,26 +263,31 @@ struct rdp_monitor
|
||||
struct rdp_settings
|
||||
{
|
||||
ALIGN64 void* instance; /* 0 */
|
||||
UINT64 paddingA[16 - 1]; /* 1 */
|
||||
UINT64 padding001[16 - 1]; /* 1 */
|
||||
|
||||
/* Core Protocol Parameters */
|
||||
ALIGN64 UINT32 width; /* 16 */
|
||||
ALIGN64 UINT32 height; /* 17 */
|
||||
ALIGN64 UINT32 rdp_version; /* 18 */
|
||||
ALIGN64 UINT32 color_depth; /* 19 */
|
||||
ALIGN64 UINT32 kbd_layout; /* 20 */
|
||||
ALIGN64 UINT32 kbd_type; /* 21 */
|
||||
ALIGN64 UINT32 kbd_subtype; /* 22 */
|
||||
ALIGN64 UINT32 kbd_fn_keys; /* 23 */
|
||||
ALIGN64 UINT32 client_build; /* 24 */
|
||||
ALIGN64 UINT32 requested_protocols; /* 25 */
|
||||
ALIGN64 UINT32 selected_protocol; /* 26 */
|
||||
ALIGN64 UINT32 encryption_method; /* 27 */
|
||||
ALIGN64 UINT32 encryption_level; /* 28 */
|
||||
ALIGN64 BOOL authentication; /* 29 */
|
||||
ALIGN64 UINT32 negotiationFlags; /* 30 */
|
||||
ALIGN64 BOOL security_layer_negotiation; /* 31 */
|
||||
UINT64 paddingB[48 - 32]; /* 32 */
|
||||
ALIGN64 UINT32 RdpVersion; /* 16 */
|
||||
ALIGN64 UINT32 DesktopWidth; /* 17 */
|
||||
ALIGN64 UINT32 DesktopHeight; /* 18 */
|
||||
ALIGN64 UINT32 ColorDepth; /* 19 */
|
||||
ALIGN64 UINT32 KeyboardLayout; /* 20 */
|
||||
ALIGN64 UINT32 KeyboardType; /* 21 */
|
||||
ALIGN64 UINT32 KeyboardSubType; /* 22 */
|
||||
ALIGN64 UINT32 KeyboardFunctionKey; /* 23 */
|
||||
ALIGN64 char* ImeFileName; /* 24 */
|
||||
ALIGN64 UINT32 ClientBuild; /* 25 */
|
||||
ALIGN64 char* ClientName; /* 26 */
|
||||
ALIGN64 char* ClientDigProductId; /* 27 */
|
||||
|
||||
/* Protocol Security Negotiation */
|
||||
ALIGN64 UINT32 requested_protocols; /* 28 */
|
||||
ALIGN64 UINT32 selected_protocol; /* 29 */
|
||||
ALIGN64 UINT32 encryption_method; /* 30 */
|
||||
ALIGN64 UINT32 encryption_level; /* 31 */
|
||||
ALIGN64 BOOL authentication; /* 32 */
|
||||
ALIGN64 UINT32 negotiationFlags; /* 33 */
|
||||
ALIGN64 BOOL security_layer_negotiation; /* 34 */
|
||||
UINT64 padding002[48 - 35]; /* 35 */
|
||||
|
||||
/* Connection Settings */
|
||||
ALIGN64 UINT32 port; /* 48 */
|
||||
@ -295,10 +307,10 @@ struct rdp_settings
|
||||
ALIGN64 DWORD password_cookie_length; /* 62 */
|
||||
ALIGN64 char* kerberos_kdc; /* 63 */
|
||||
ALIGN64 char* kerberos_realm; /* 64 */
|
||||
ALIGN64 BOOL ts_gateway; /* 65 */
|
||||
ALIGN64 char* tsg_hostname; /* 66 */
|
||||
ALIGN64 char* tsg_username; /* 67 */
|
||||
ALIGN64 char* tsg_password; /* 68 */
|
||||
ALIGN64 void* unused65; /* 65 */
|
||||
ALIGN64 void* unused66; /* 66 */
|
||||
ALIGN64 void* unused67; /* 67 */
|
||||
ALIGN64 void* unused68; /* 68 */
|
||||
ALIGN64 BOOL local; /* 69 */
|
||||
ALIGN64 BOOL authentication_only; /* 70 */
|
||||
ALIGN64 BOOL from_stdin; /* 71 */
|
||||
@ -307,10 +319,7 @@ struct rdp_settings
|
||||
ALIGN64 char* preconnection_blob; /* 74 */
|
||||
ALIGN64 char* computer_name; /* 75 */
|
||||
ALIGN64 char* connection_file; /* 76 */
|
||||
ALIGN64 char* tsg_domain; /* 77 */
|
||||
ALIGN64 BOOL tsg_same_credentials; /* 78 */
|
||||
ALIGN64 UINT32 tsg_port; /* 79 */
|
||||
//UINT64 paddingC[80 - 80]; /* 80 */
|
||||
UINT64 padding003[80 - 77]; /* 77 */
|
||||
|
||||
/* User Interface Parameters */
|
||||
ALIGN64 BOOL sw_gdi; /* 80 */
|
||||
@ -322,7 +331,7 @@ struct rdp_settings
|
||||
ALIGN64 BOOL mouse_motion; /* 86 */
|
||||
ALIGN64 char* window_title; /* 87 */
|
||||
ALIGN64 UINT64 parent_window_xid; /* 88 */
|
||||
UINT64 paddingD[112 - 89]; /* 89 */
|
||||
UINT64 padding004[112 - 89]; /* 89 */
|
||||
|
||||
/* Internal Parameters */
|
||||
ALIGN64 char* home_path; /* 112 */
|
||||
@ -334,19 +343,19 @@ struct rdp_settings
|
||||
ALIGN64 char* current_path; /* 118 */
|
||||
ALIGN64 char* development_path; /* 119 */
|
||||
ALIGN64 BOOL development_mode; /* 120 */
|
||||
UINT64 paddingE[144 - 121]; /* 121 */
|
||||
UINT64 padding005[144 - 121]; /* 121 */
|
||||
|
||||
/* Security */
|
||||
ALIGN64 BOOL encryption; /* 144 */
|
||||
ALIGN64 BOOL tls_security; /* 145 */
|
||||
ALIGN64 BOOL nla_security; /* 146 */
|
||||
ALIGN64 BOOL rdp_security; /* 147 */
|
||||
ALIGN64 UINT32 ntlm_version; /* 148 */
|
||||
ALIGN64 BOOL salted_checksum; /* 149 */
|
||||
ALIGN64 BOOL ext_security; /* 150 */
|
||||
ALIGN64 BOOL ext_security; /* 148 */
|
||||
ALIGN64 UINT32 ntlm_version; /* 149 */
|
||||
ALIGN64 BOOL salted_checksum; /* 150 */
|
||||
ALIGN64 BOOL mstsc_cookie_mode; /* 151 */
|
||||
ALIGN64 UINT32 cookie_max_length; /* 152 */
|
||||
UINT64 paddingF[160 - 153]; /* 153 */
|
||||
UINT64 padding006[160 - 153]; /* 153 */
|
||||
|
||||
/* Session */
|
||||
ALIGN64 BOOL console_audio; /* 160 */
|
||||
@ -354,23 +363,23 @@ struct rdp_settings
|
||||
ALIGN64 UINT32 redirected_session_id; /* 162 */
|
||||
ALIGN64 BOOL audio_playback; /* 163 */
|
||||
ALIGN64 BOOL audio_capture; /* 164 */
|
||||
UINT64 paddingG[176 - 165]; /* 165 */
|
||||
UINT64 padding007[176 - 165]; /* 165 */
|
||||
|
||||
/* Output Control */
|
||||
ALIGN64 BOOL refresh_rect; /* 176 */
|
||||
ALIGN64 BOOL suppress_output; /* 177 */
|
||||
ALIGN64 BOOL desktop_resize; /* 178 */
|
||||
UINT64 paddingH[192 - 179]; /* 179 */
|
||||
UINT64 padding008[192 - 179]; /* 179 */
|
||||
|
||||
/* Reconnection */
|
||||
ALIGN64 BOOL auto_reconnection; /* 192 */
|
||||
ALIGN64 ARC_CS_PRIVATE_PACKET* client_auto_reconnect_cookie; /* 193 */
|
||||
ALIGN64 ARC_SC_PRIVATE_PACKET* server_auto_reconnect_cookie; /* 194 */
|
||||
UINT64 paddingI[208 - 195]; /* 195 */
|
||||
UINT64 padding009[208 - 195]; /* 195 */
|
||||
|
||||
/* Time Zone */
|
||||
ALIGN64 TIME_ZONE_INFO* client_time_zone; /* 208 */
|
||||
UINT64 paddingJ[216 - 209]; /* 209 */
|
||||
UINT64 padding010[216 - 209]; /* 209 */
|
||||
|
||||
/* Capabilities */
|
||||
ALIGN64 UINT32 os_major_type; /* 216 */
|
||||
@ -388,9 +397,9 @@ struct rdp_settings
|
||||
ALIGN64 BOOL disable_full_window_drag; /* 228 */
|
||||
ALIGN64 BOOL disable_menu_animations; /* 229 */
|
||||
ALIGN64 BOOL disable_theming; /* 230 */
|
||||
ALIGN64 UINT32 connection_type; /* 231 */
|
||||
ALIGN64 UINT32 ConnectionType; /* 231 */
|
||||
ALIGN64 UINT32 multifrag_max_request_size; /* 232 */
|
||||
UINT64 paddingK[248 - 233]; /* 233 */
|
||||
UINT64 padding011[248 - 233]; /* 233 */
|
||||
|
||||
/* Certificate */
|
||||
ALIGN64 char* cert_file; /* 248 */
|
||||
@ -406,7 +415,7 @@ struct rdp_settings
|
||||
ALIGN64 char* rdp_key_file; /* 258 */
|
||||
ALIGN64 rdpKey* server_key; /* 259 */
|
||||
ALIGN64 char* certificate_name; /* 260 */
|
||||
UINT64 paddingL[280 - 261]; /* 261 */
|
||||
UINT64 padding012[280 - 261]; /* 261 */
|
||||
|
||||
/* Codecs */
|
||||
ALIGN64 BOOL rfx_codec; /* 280 */
|
||||
@ -420,27 +429,27 @@ struct rdp_settings
|
||||
ALIGN64 UINT32 jpeg_quality; /* 288 */
|
||||
ALIGN64 UINT32 v3_codec_id; /* 289 */
|
||||
ALIGN64 BOOL rfx_codec_only; /* 290 */
|
||||
UINT64 paddingM[296 - 291]; /* 291 */
|
||||
UINT64 padding013[296 - 291]; /* 291 */
|
||||
|
||||
/* Recording */
|
||||
ALIGN64 BOOL dump_rfx; /* 296 */
|
||||
ALIGN64 BOOL play_rfx; /* 297 */
|
||||
ALIGN64 char* dump_rfx_file; /* 298 */
|
||||
ALIGN64 char* play_rfx_file; /* 299 */
|
||||
UINT64 paddingN[312 - 300]; /* 300 */
|
||||
UINT64 padding014[312 - 300]; /* 300 */
|
||||
|
||||
/* RemoteApp */
|
||||
ALIGN64 BOOL remote_app; /* 312 */
|
||||
ALIGN64 UINT32 num_icon_caches; /* 313 */
|
||||
ALIGN64 UINT32 num_icon_cache_entries; /* 314 */
|
||||
ALIGN64 BOOL rail_langbar_supported; /* 315 */
|
||||
UINT64 paddingO[320 - 316]; /* 316 */
|
||||
UINT64 padding015[320 - 316]; /* 316 */
|
||||
|
||||
/* Pointer */
|
||||
ALIGN64 BOOL large_pointer; /* 320 */
|
||||
ALIGN64 BOOL color_pointer; /* 321 */
|
||||
ALIGN64 UINT32 pointer_cache_size; /* 322 */
|
||||
UINT64 paddingP[328 - 323]; /* 323 */
|
||||
UINT64 padding016[328 - 323]; /* 323 */
|
||||
|
||||
/* Bitmap Cache */
|
||||
ALIGN64 BOOL bitmap_cache; /* 328 */
|
||||
@ -449,35 +458,63 @@ struct rdp_settings
|
||||
ALIGN64 UINT32 bitmapCacheV2NumCells; /* 331 */
|
||||
ALIGN64 BITMAP_CACHE_V2_CELL_INFO* bitmapCacheV2CellInfo; /* 332 */
|
||||
ALIGN64 BOOL allow_cache_waiting_list; /* 333 */
|
||||
UINT64 paddingQ[344 - 334]; /* 334 */
|
||||
UINT64 padding017[344 - 334]; /* 334 */
|
||||
|
||||
/* Offscreen Bitmap Cache */
|
||||
ALIGN64 BOOL offscreen_bitmap_cache; /* 344 */
|
||||
ALIGN64 UINT32 offscreen_bitmap_cache_size; /* 345 */
|
||||
ALIGN64 UINT32 offscreen_bitmap_cache_entries; /* 346 */
|
||||
UINT64 paddingR[352 - 347]; /* 347 */
|
||||
UINT64 padding018[352 - 347]; /* 347 */
|
||||
|
||||
/* Glyph Cache */
|
||||
ALIGN64 void* unused352; /* 352 */
|
||||
ALIGN64 UINT32 glyphSupportLevel; /* 353 */
|
||||
ALIGN64 GLYPH_CACHE_DEFINITION* glyphCache; /* 354 */
|
||||
ALIGN64 GLYPH_CACHE_DEFINITION* fragCache; /* 355 */
|
||||
UINT64 paddingS[360 - 356]; /* 356 */
|
||||
UINT64 padding019[360 - 356]; /* 356 */
|
||||
|
||||
/* Draw Nine Grid */
|
||||
ALIGN64 BOOL draw_nine_grid; /* 360 */
|
||||
ALIGN64 UINT32 draw_nine_grid_cache_size; /* 361 */
|
||||
ALIGN64 UINT32 draw_nine_grid_cache_entries; /* 362 */
|
||||
UINT64 paddingT[368 - 363]; /* 363 */
|
||||
UINT64 padding020[368 - 363]; /* 363 */
|
||||
|
||||
/* Draw GDI+ */
|
||||
ALIGN64 BOOL draw_gdi_plus; /* 368 */
|
||||
ALIGN64 BOOL draw_gdi_plus_cache; /* 369 */
|
||||
UINT64 paddingU[376 - 370]; /* 370 */
|
||||
UINT64 padding021[376 - 370]; /* 370 */
|
||||
|
||||
/* Desktop Composition */
|
||||
ALIGN64 BOOL desktop_composition; /* 376 */
|
||||
UINT64 paddingV[384 - 377]; /* 377 */
|
||||
UINT64 padding022[384 - 377]; /* 377 */
|
||||
|
||||
/* TS Gateway */
|
||||
ALIGN64 BOOL ts_gateway; /* 384 */
|
||||
ALIGN64 UINT32 tsg_port; /* 385 */
|
||||
ALIGN64 char* tsg_hostname; /* 386 */
|
||||
ALIGN64 char* tsg_username; /* 387 */
|
||||
ALIGN64 char* tsg_password; /* 388 */
|
||||
ALIGN64 char* tsg_domain; /* 389 */
|
||||
ALIGN64 BOOL tsg_same_credentials; /* 390 */
|
||||
UINT64 padding023[400 - 391]; /* 391 */
|
||||
|
||||
/* Device Redirection */
|
||||
ALIGN64 BOOL DeviceRedirection;
|
||||
|
||||
/* Drive Redirection */
|
||||
ALIGN64 BOOL RedirectDrives;
|
||||
|
||||
/* Smartcard Redirection */
|
||||
ALIGN64 BOOL RedirectSmartCards;
|
||||
|
||||
/* Printer Redirection */
|
||||
ALIGN64 BOOL RedirectPrinters;
|
||||
|
||||
/* Serial Port Redirection */
|
||||
ALIGN64 BOOL RedirectSerialPorts;
|
||||
|
||||
/* Parallel Port Redirection */
|
||||
ALIGN64 BOOL RedirectParallelPorts;
|
||||
|
||||
/* Channels */
|
||||
ALIGN64 int num_channels;
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
struct _RDP_PLUGIN_DATA
|
||||
{
|
||||
UINT16 size;
|
||||
DWORD size;
|
||||
void* data[4];
|
||||
};
|
||||
typedef struct _RDP_PLUGIN_DATA RDP_PLUGIN_DATA;
|
||||
|
4
libfreerdp/cache/bitmap.c
vendored
4
libfreerdp/cache/bitmap.c
vendored
@ -107,7 +107,7 @@ void update_gdi_cache_bitmap_v2(rdpContext* context, CACHE_BITMAP_V2_ORDER* cach
|
||||
if (cache_bitmap_v2->bitmapBpp == 0)
|
||||
{
|
||||
/* Workaround for Windows 8 bug where bitmapBpp is not set */
|
||||
cache_bitmap_v2->bitmapBpp = context->instance->settings->color_depth;
|
||||
cache_bitmap_v2->bitmapBpp = context->instance->settings->ColorDepth;
|
||||
}
|
||||
|
||||
bitmap->Decompress(context, bitmap,
|
||||
@ -139,7 +139,7 @@ void update_gdi_cache_bitmap_v3(rdpContext* context, CACHE_BITMAP_V3_ORDER* cach
|
||||
if (cache_bitmap_v3->bitmapData.bpp == 0)
|
||||
{
|
||||
/* Workaround for Windows 8 bug where bitmapBpp is not set */
|
||||
cache_bitmap_v3->bitmapData.bpp = context->instance->settings->color_depth;
|
||||
cache_bitmap_v3->bitmapData.bpp = context->instance->settings->ColorDepth;
|
||||
}
|
||||
|
||||
bitmap->Decompress(context, bitmap,
|
||||
|
@ -216,10 +216,10 @@ void rdp_read_bitmap_capability_set(STREAM* s, UINT16 length, rdpSettings* setti
|
||||
stream_seek_UINT16(s); /* multipleRectangleSupport (2 bytes) */
|
||||
stream_seek_UINT16(s); /* pad2OctetsB (2 bytes) */
|
||||
|
||||
if (!settings->server_mode && preferredBitsPerPixel != settings->color_depth)
|
||||
if (!settings->server_mode && preferredBitsPerPixel != settings->ColorDepth)
|
||||
{
|
||||
/* The client must respect the actual color depth used by the server */
|
||||
settings->color_depth = preferredBitsPerPixel;
|
||||
settings->ColorDepth = preferredBitsPerPixel;
|
||||
}
|
||||
|
||||
if (desktopResizeFlag == FALSE)
|
||||
@ -228,8 +228,8 @@ void rdp_read_bitmap_capability_set(STREAM* s, UINT16 length, rdpSettings* setti
|
||||
if (!settings->server_mode && settings->desktop_resize)
|
||||
{
|
||||
/* The server may request a different desktop size during Deactivation-Reactivation sequence */
|
||||
settings->width = desktopWidth;
|
||||
settings->height = desktopHeight;
|
||||
settings->DesktopWidth = desktopWidth;
|
||||
settings->DesktopHeight = desktopHeight;
|
||||
}
|
||||
}
|
||||
|
||||
@ -251,8 +251,8 @@ void rdp_write_bitmap_capability_set(STREAM* s, rdpSettings* settings)
|
||||
|
||||
drawingFlags |= DRAW_ALLOW_SKIP_ALPHA;
|
||||
|
||||
if (settings->rdp_version > 5)
|
||||
preferredBitsPerPixel = settings->color_depth;
|
||||
if (settings->RdpVersion > 5)
|
||||
preferredBitsPerPixel = settings->ColorDepth;
|
||||
else
|
||||
preferredBitsPerPixel = 8;
|
||||
|
||||
@ -262,8 +262,8 @@ void rdp_write_bitmap_capability_set(STREAM* s, rdpSettings* settings)
|
||||
stream_write_UINT16(s, 1); /* receive1BitPerPixel (2 bytes) */
|
||||
stream_write_UINT16(s, 1); /* receive4BitsPerPixel (2 bytes) */
|
||||
stream_write_UINT16(s, 1); /* receive8BitsPerPixel (2 bytes) */
|
||||
stream_write_UINT16(s, settings->width); /* desktopWidth (2 bytes) */
|
||||
stream_write_UINT16(s, settings->height); /* desktopHeight (2 bytes) */
|
||||
stream_write_UINT16(s, settings->DesktopWidth); /* desktopWidth (2 bytes) */
|
||||
stream_write_UINT16(s, settings->DesktopHeight); /* desktopHeight (2 bytes) */
|
||||
stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */
|
||||
stream_write_UINT16(s, desktopResizeFlag); /* desktopResizeFlag (2 bytes) */
|
||||
stream_write_UINT16(s, 1); /* bitmapCompressionFlag (2 bytes) */
|
||||
@ -407,7 +407,7 @@ void rdp_write_bitmap_cache_capability_set(STREAM* s, rdpSettings* settings)
|
||||
|
||||
header = rdp_capability_set_start(s);
|
||||
|
||||
bpp = (settings->color_depth + 7) / 8;
|
||||
bpp = (settings->ColorDepth + 7) / 8;
|
||||
|
||||
stream_write_UINT32(s, 0); /* pad1 (4 bytes) */
|
||||
stream_write_UINT32(s, 0); /* pad2 (4 bytes) */
|
||||
@ -678,10 +678,10 @@ void rdp_read_input_capability_set(STREAM* s, UINT16 length, rdpSettings* settin
|
||||
|
||||
if (settings->server_mode)
|
||||
{
|
||||
stream_read_UINT32(s, settings->kbd_layout); /* keyboardLayout (4 bytes) */
|
||||
stream_read_UINT32(s, settings->kbd_type); /* keyboardType (4 bytes) */
|
||||
stream_read_UINT32(s, settings->kbd_subtype); /* keyboardSubType (4 bytes) */
|
||||
stream_read_UINT32(s, settings->kbd_fn_keys); /* keyboardFunctionKeys (4 bytes) */
|
||||
stream_read_UINT32(s, settings->KeyboardLayout); /* keyboardLayout (4 bytes) */
|
||||
stream_read_UINT32(s, settings->KeyboardType); /* keyboardType (4 bytes) */
|
||||
stream_read_UINT32(s, settings->KeyboardSubType); /* keyboardSubType (4 bytes) */
|
||||
stream_read_UINT32(s, settings->KeyboardFunctionKey); /* keyboardFunctionKeys (4 bytes) */
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -735,10 +735,10 @@ void rdp_write_input_capability_set(STREAM* s, rdpSettings* settings)
|
||||
|
||||
stream_write_UINT16(s, inputFlags); /* inputFlags (2 bytes) */
|
||||
stream_write_UINT16(s, 0); /* pad2OctetsA (2 bytes) */
|
||||
stream_write_UINT32(s, settings->kbd_layout); /* keyboardLayout (4 bytes) */
|
||||
stream_write_UINT32(s, settings->kbd_type); /* keyboardType (4 bytes) */
|
||||
stream_write_UINT32(s, settings->kbd_subtype); /* keyboardSubType (4 bytes) */
|
||||
stream_write_UINT32(s, settings->kbd_fn_keys); /* keyboardFunctionKeys (4 bytes) */
|
||||
stream_write_UINT32(s, settings->KeyboardLayout); /* keyboardLayout (4 bytes) */
|
||||
stream_write_UINT32(s, settings->KeyboardType); /* keyboardType (4 bytes) */
|
||||
stream_write_UINT32(s, settings->KeyboardSubType); /* keyboardSubType (4 bytes) */
|
||||
stream_write_UINT32(s, settings->KeyboardFunctionKey); /* keyboardFunctionKeys (4 bytes) */
|
||||
stream_write_zero(s, 64); /* imeFileName (64 bytes) */
|
||||
|
||||
rdp_capability_set_finish(s, header, CAPSET_TYPE_INPUT);
|
||||
@ -2061,7 +2061,7 @@ void rdp_write_confirm_active(STREAM* s, rdpSettings* settings)
|
||||
rdp_write_bitmap_capability_set(s, settings);
|
||||
rdp_write_order_capability_set(s, settings);
|
||||
|
||||
if (settings->rdp_version >= 5)
|
||||
if (settings->RdpVersion >= 5)
|
||||
rdp_write_bitmap_cache_v2_capability_set(s, settings);
|
||||
else
|
||||
rdp_write_bitmap_cache_capability_set(s, settings);
|
||||
|
@ -503,8 +503,8 @@ BOOL rdp_client_connect_demand_active(rdpRdp* rdp, STREAM* s)
|
||||
UINT16 width;
|
||||
UINT16 height;
|
||||
|
||||
width = rdp->settings->width;
|
||||
height = rdp->settings->height;
|
||||
width = rdp->settings->DesktopWidth;
|
||||
height = rdp->settings->DesktopHeight;
|
||||
|
||||
stream_get_mark(s, mark);
|
||||
|
||||
@ -531,7 +531,7 @@ BOOL rdp_client_connect_demand_active(rdpRdp* rdp, STREAM* s)
|
||||
* The server may request a different desktop size during Deactivation-Reactivation sequence.
|
||||
* In this case, the UI should be informed and do actual window resizing at this point.
|
||||
*/
|
||||
if (width != rdp->settings->width || height != rdp->settings->height)
|
||||
if (width != rdp->settings->DesktopWidth || height != rdp->settings->DesktopHeight)
|
||||
{
|
||||
IFCALL(rdp->update->DesktopResize, rdp->update->context);
|
||||
}
|
||||
|
@ -61,11 +61,11 @@ BOOL freerdp_connect(freerdp* instance)
|
||||
|
||||
IFCALLRET(instance->PreConnect, status, instance);
|
||||
|
||||
if (settings->kbd_layout == KBD_JAPANESE_INPUT_SYSTEM_MS_IME2002)
|
||||
if (settings->KeyboardLayout == KBD_JAPANESE_INPUT_SYSTEM_MS_IME2002)
|
||||
{
|
||||
settings->kbd_type = 7;
|
||||
settings->kbd_subtype = 2;
|
||||
settings->kbd_fn_keys = 12;
|
||||
settings->KeyboardType = 7;
|
||||
settings->KeyboardSubType = 2;
|
||||
settings->KeyboardFunctionKey = 12;
|
||||
}
|
||||
|
||||
extension_load_and_init_plugins(rdp->extension);
|
||||
|
@ -481,14 +481,14 @@ BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, UINT16 blockLen
|
||||
return FALSE;
|
||||
|
||||
stream_read_UINT32(s, version); /* version */
|
||||
settings->rdp_version = (version == RDP_VERSION_4 ? 4 : 7);
|
||||
settings->RdpVersion = (version == RDP_VERSION_4 ? 4 : 7);
|
||||
|
||||
stream_read_UINT16(s, settings->width); /* desktopWidth */
|
||||
stream_read_UINT16(s, settings->height); /* desktopHeight */
|
||||
stream_read_UINT16(s, colorDepth); /* colorDepth */
|
||||
stream_read_UINT16(s, settings->DesktopWidth); /* DesktopWidth */
|
||||
stream_read_UINT16(s, settings->DesktopHeight); /* DesktopHeight */
|
||||
stream_read_UINT16(s, colorDepth); /* ColorDepth */
|
||||
stream_seek_UINT16(s); /* SASSequence (Secure Access Sequence) */
|
||||
stream_read_UINT32(s, settings->kbd_layout); /* keyboardLayout */
|
||||
stream_read_UINT32(s, settings->client_build); /* clientBuild */
|
||||
stream_read_UINT32(s, settings->KeyboardLayout); /* KeyboardLayout */
|
||||
stream_read_UINT32(s, settings->ClientBuild); /* ClientBuild */
|
||||
|
||||
/* clientName (32 bytes, null-terminated unicode, truncated to 15 characters) */
|
||||
freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &str, 32 / 2);
|
||||
@ -497,9 +497,9 @@ BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, UINT16 blockLen
|
||||
settings->client_hostname[31] = 0;
|
||||
free(str);
|
||||
|
||||
stream_read_UINT32(s, settings->kbd_type); /* keyboardType */
|
||||
stream_read_UINT32(s, settings->kbd_subtype); /* keyboardSubType */
|
||||
stream_read_UINT32(s, settings->kbd_fn_keys); /* keyboardFunctionKey */
|
||||
stream_read_UINT32(s, settings->KeyboardType); /* KeyboardType */
|
||||
stream_read_UINT32(s, settings->KeyboardSubType); /* KeyboardSubType */
|
||||
stream_read_UINT32(s, settings->KeyboardFunctionKey); /* KeyboardFunctionKey */
|
||||
|
||||
stream_seek(s, 64); /* imeFileName */
|
||||
|
||||
@ -573,7 +573,9 @@ BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, UINT16 blockLen
|
||||
} while (0);
|
||||
|
||||
if (highColorDepth > 0)
|
||||
{
|
||||
color_depth = highColorDepth;
|
||||
}
|
||||
else if (postBeta2ColorDepth > 0)
|
||||
{
|
||||
switch (postBeta2ColorDepth)
|
||||
@ -616,8 +618,8 @@ BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, UINT16 blockLen
|
||||
* If we are in server mode, accept client's color depth only if
|
||||
* it is smaller than ours. This is what Windows server does.
|
||||
*/
|
||||
if (color_depth < settings->color_depth || !settings->server_mode)
|
||||
settings->color_depth = color_depth;
|
||||
if (color_depth < settings->ColorDepth || !settings->server_mode)
|
||||
settings->ColorDepth = color_depth;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -643,18 +645,18 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings* settings)
|
||||
|
||||
gcc_write_user_data_header(s, CS_CORE, 216);
|
||||
|
||||
version = settings->rdp_version >= 5 ? RDP_VERSION_5_PLUS : RDP_VERSION_4;
|
||||
version = settings->RdpVersion >= 5 ? RDP_VERSION_5_PLUS : RDP_VERSION_4;
|
||||
|
||||
clientNameLength = freerdp_AsciiToUnicodeAlloc(settings->client_hostname, &clientName, 0);
|
||||
clientDigProductIdLength = freerdp_AsciiToUnicodeAlloc(settings->client_product_id, &clientDigProductId, 0);
|
||||
|
||||
stream_write_UINT32(s, version); /* version */
|
||||
stream_write_UINT16(s, settings->width); /* desktopWidth */
|
||||
stream_write_UINT16(s, settings->height); /* desktopHeight */
|
||||
stream_write_UINT16(s, RNS_UD_COLOR_8BPP); /* colorDepth, ignored because of postBeta2ColorDepth */
|
||||
stream_write_UINT32(s, version); /* Version */
|
||||
stream_write_UINT16(s, settings->DesktopWidth); /* DesktopWidth */
|
||||
stream_write_UINT16(s, settings->DesktopHeight); /* DesktopHeight */
|
||||
stream_write_UINT16(s, RNS_UD_COLOR_8BPP); /* ColorDepth, ignored because of postBeta2ColorDepth */
|
||||
stream_write_UINT16(s, RNS_UD_SAS_DEL); /* SASSequence (Secure Access Sequence) */
|
||||
stream_write_UINT32(s, settings->kbd_layout); /* keyboardLayout */
|
||||
stream_write_UINT32(s, settings->client_build); /* clientBuild */
|
||||
stream_write_UINT32(s, settings->KeyboardLayout); /* KeyboardLayout */
|
||||
stream_write_UINT32(s, settings->ClientBuild); /* ClientBuild */
|
||||
|
||||
/* clientName (32 bytes, null-terminated unicode, truncated to 15 characters) */
|
||||
|
||||
@ -668,9 +670,9 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings* settings)
|
||||
stream_write_zero(s, 32 - ((clientNameLength + 1) * 2));
|
||||
free(clientName);
|
||||
|
||||
stream_write_UINT32(s, settings->kbd_type); /* keyboardType */
|
||||
stream_write_UINT32(s, settings->kbd_subtype); /* keyboardSubType */
|
||||
stream_write_UINT32(s, settings->kbd_fn_keys); /* keyboardFunctionKey */
|
||||
stream_write_UINT32(s, settings->KeyboardType); /* KeyboardType */
|
||||
stream_write_UINT32(s, settings->KeyboardSubType); /* KeyboardSubType */
|
||||
stream_write_UINT32(s, settings->KeyboardFunctionKey); /* KeyboardFunctionKey */
|
||||
|
||||
stream_write_zero(s, 64); /* imeFileName */
|
||||
|
||||
@ -678,14 +680,14 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings* settings)
|
||||
stream_write_UINT16(s, 1); /* clientProductID */
|
||||
stream_write_UINT32(s, 0); /* serialNumber (should be initialized to 0) */
|
||||
|
||||
highColorDepth = MIN(settings->color_depth, 24);
|
||||
highColorDepth = MIN(settings->ColorDepth, 24);
|
||||
|
||||
supportedColorDepths =
|
||||
RNS_UD_24BPP_SUPPORT |
|
||||
RNS_UD_16BPP_SUPPORT |
|
||||
RNS_UD_15BPP_SUPPORT;
|
||||
|
||||
connectionType = settings->connection_type;
|
||||
connectionType = settings->ConnectionType;
|
||||
earlyCapabilityFlags = RNS_UD_CS_SUPPORT_ERRINFO_PDU;
|
||||
|
||||
if (settings->rfx_codec)
|
||||
@ -694,7 +696,7 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings* settings)
|
||||
if (connectionType != 0)
|
||||
earlyCapabilityFlags |= RNS_UD_CS_VALID_CONNECTION_TYPE;
|
||||
|
||||
if (settings->color_depth == 32)
|
||||
if (settings->ColorDepth == 32)
|
||||
{
|
||||
supportedColorDepths |= RNS_UD_32BPP_SUPPORT;
|
||||
earlyCapabilityFlags |= RNS_UD_CS_WANT_32BPP_SESSION;
|
||||
@ -730,10 +732,10 @@ BOOL gcc_read_server_core_data(STREAM* s, rdpSettings* settings)
|
||||
stream_read_UINT32(s, version); /* version */
|
||||
stream_read_UINT32(s, clientRequestedProtocols); /* clientRequestedProtocols */
|
||||
|
||||
if (version == RDP_VERSION_4 && settings->rdp_version > 4)
|
||||
settings->rdp_version = 4;
|
||||
else if (version == RDP_VERSION_5_PLUS && settings->rdp_version < 5)
|
||||
settings->rdp_version = 7;
|
||||
if (version == RDP_VERSION_4 && settings->RdpVersion > 4)
|
||||
settings->RdpVersion = 4;
|
||||
else if (version == RDP_VERSION_5_PLUS && settings->RdpVersion < 5)
|
||||
settings->RdpVersion = 7;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -742,7 +744,7 @@ void gcc_write_server_core_data(STREAM* s, rdpSettings* settings)
|
||||
{
|
||||
gcc_write_user_data_header(s, SC_CORE, 12);
|
||||
|
||||
stream_write_UINT32(s, settings->rdp_version == 4 ? RDP_VERSION_4 : RDP_VERSION_5_PLUS);
|
||||
stream_write_UINT32(s, settings->RdpVersion == 4 ? RDP_VERSION_4 : RDP_VERSION_5_PLUS);
|
||||
stream_write_UINT32(s, settings->requested_protocols); /* clientRequestedProtocols */
|
||||
}
|
||||
|
||||
|
@ -289,7 +289,7 @@ BOOL rdp_read_info_packet(STREAM* s, rdpSettings* settings)
|
||||
}
|
||||
stream_seek(s, 2);
|
||||
|
||||
if (settings->rdp_version >= 5)
|
||||
if (settings->RdpVersion >= 5)
|
||||
return rdp_read_extended_info_packet(s, settings); /* extraInfo */
|
||||
|
||||
return TRUE;
|
||||
@ -407,7 +407,7 @@ void rdp_write_info_packet(STREAM* s, rdpSettings* settings)
|
||||
if (!usedPasswordCookie)
|
||||
free(password);
|
||||
|
||||
if (settings->rdp_version >= 5)
|
||||
if (settings->RdpVersion >= 5)
|
||||
rdp_write_extended_info_packet(s, settings); /* extraInfo */
|
||||
}
|
||||
|
||||
|
@ -66,16 +66,16 @@ void settings_client_load_hkey_local_machine(rdpSettings* settings)
|
||||
|
||||
if (status == ERROR_SUCCESS)
|
||||
{
|
||||
REG_QUERY_DWORD_VALUE(hKey, _T("DesktopWidth"), dwType, dwValue, dwSize, settings->width);
|
||||
REG_QUERY_DWORD_VALUE(hKey, _T("DesktopHeight"), dwType, dwValue, dwSize, settings->height);
|
||||
REG_QUERY_DWORD_VALUE(hKey, _T("DesktopWidth"), dwType, dwValue, dwSize, settings->DesktopWidth);
|
||||
REG_QUERY_DWORD_VALUE(hKey, _T("DesktopHeight"), dwType, dwValue, dwSize, settings->DesktopHeight);
|
||||
|
||||
REG_QUERY_BOOL_VALUE(hKey, _T("Fullscreen"), dwType, dwValue, dwSize, settings->fullscreen);
|
||||
REG_QUERY_DWORD_VALUE(hKey, _T("ColorDepth"), dwType, dwValue, dwSize, settings->color_depth);
|
||||
REG_QUERY_DWORD_VALUE(hKey, _T("ColorDepth"), dwType, dwValue, dwSize, settings->ColorDepth);
|
||||
|
||||
REG_QUERY_DWORD_VALUE(hKey, _T("KeyboardType"), dwType, dwValue, dwSize, settings->kbd_type);
|
||||
REG_QUERY_DWORD_VALUE(hKey, _T("KeyboardSubType"), dwType, dwValue, dwSize, settings->kbd_subtype);
|
||||
REG_QUERY_DWORD_VALUE(hKey, _T("KeyboardFunctionKeys"), dwType, dwValue, dwSize, settings->kbd_fn_keys);
|
||||
REG_QUERY_DWORD_VALUE(hKey, _T("KeyboardLayout"), dwType, dwValue, dwSize, settings->kbd_layout);
|
||||
REG_QUERY_DWORD_VALUE(hKey, _T("KeyboardType"), dwType, dwValue, dwSize, settings->KeyboardType);
|
||||
REG_QUERY_DWORD_VALUE(hKey, _T("KeyboardSubType"), dwType, dwValue, dwSize, settings->KeyboardSubType);
|
||||
REG_QUERY_DWORD_VALUE(hKey, _T("KeyboardFunctionKeys"), dwType, dwValue, dwSize, settings->KeyboardFunctionKey);
|
||||
REG_QUERY_DWORD_VALUE(hKey, _T("KeyboardLayout"), dwType, dwValue, dwSize, settings->KeyboardLayout);
|
||||
|
||||
REG_QUERY_BOOL_VALUE(hKey, _T("ExtSecurity"), dwType, dwValue, dwSize, settings->ext_security);
|
||||
REG_QUERY_BOOL_VALUE(hKey, _T("NlaSecurity"), dwType, dwValue, dwSize, settings->nla_security);
|
||||
@ -216,14 +216,14 @@ rdpSettings* settings_new(void* instance)
|
||||
if (!settings->instance)
|
||||
settings->server_mode = TRUE;
|
||||
|
||||
settings->width = 1024;
|
||||
settings->height = 768;
|
||||
settings->DesktopWidth = 1024;
|
||||
settings->DesktopHeight = 768;
|
||||
settings->workarea = FALSE;
|
||||
settings->fullscreen = FALSE;
|
||||
settings->grab_keyboard = TRUE;
|
||||
settings->decorations = TRUE;
|
||||
settings->rdp_version = 7;
|
||||
settings->color_depth = 16;
|
||||
settings->RdpVersion = 7;
|
||||
settings->ColorDepth = 16;
|
||||
settings->ext_security = FALSE;
|
||||
settings->nla_security = TRUE;
|
||||
settings->tls_security = TRUE;
|
||||
@ -231,11 +231,11 @@ rdpSettings* settings_new(void* instance)
|
||||
settings->security_layer_negotiation = TRUE;
|
||||
settings->mstsc_cookie_mode = FALSE;
|
||||
settings->cookie_max_length = DEFAULT_COOKIE_MAX_LENGTH;
|
||||
settings->client_build = 2600;
|
||||
settings->kbd_type = 4; /* @msdn{cc240510} 'IBM enhanced (101- or 102-key) keyboard' */
|
||||
settings->kbd_subtype = 0;
|
||||
settings->kbd_fn_keys = 12;
|
||||
settings->kbd_layout = 0;
|
||||
settings->ClientBuild = 2600;
|
||||
settings->KeyboardType = 4; /* @msdn{cc240510} 'IBM enhanced (101- or 102-key) keyboard' */
|
||||
settings->KeyboardSubType = 0;
|
||||
settings->KeyboardFunctionKey = 12;
|
||||
settings->KeyboardLayout = 0;
|
||||
settings->encryption = FALSE;
|
||||
settings->salted_checksum = TRUE;
|
||||
settings->port = 3389;
|
||||
@ -298,7 +298,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->ConnectionType = 0;
|
||||
|
||||
settings->draw_gdi_plus = FALSE;
|
||||
|
||||
|
@ -885,9 +885,9 @@ int gdi_init(freerdp* instance, UINT32 flags, BYTE* buffer)
|
||||
instance->context->gdi = gdi;
|
||||
cache = instance->context->cache;
|
||||
|
||||
gdi->width = instance->settings->width;
|
||||
gdi->height = instance->settings->height;
|
||||
gdi->srcBpp = instance->settings->color_depth;
|
||||
gdi->width = instance->settings->DesktopWidth;
|
||||
gdi->height = instance->settings->DesktopHeight;
|
||||
gdi->srcBpp = instance->settings->ColorDepth;
|
||||
gdi->primary_buffer = buffer;
|
||||
|
||||
/* default internal buffer format */
|
||||
|
@ -192,7 +192,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
printf("missing color depth\n");
|
||||
return FREERDP_ARGS_PARSE_FAILURE;
|
||||
}
|
||||
settings->color_depth = atoi(argv[index]);
|
||||
settings->ColorDepth = atoi(argv[index]);
|
||||
}
|
||||
else if (strcmp("-u", argv[index]) == 0)
|
||||
{
|
||||
@ -267,15 +267,16 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
}
|
||||
else
|
||||
{
|
||||
settings->width = (UINT16) strtol(argv[index], &p, 10);
|
||||
settings->DesktopWidth = (UINT16) strtol(argv[index], &p, 10);
|
||||
|
||||
if (*p == 'x')
|
||||
{
|
||||
settings->height = (UINT16) strtol(p + 1, &p, 10);
|
||||
settings->DesktopHeight = (UINT16) strtol(p + 1, &p, 10);
|
||||
}
|
||||
if (*p == '%')
|
||||
{
|
||||
settings->percent_screen = settings->width;
|
||||
settings->percent_screen = settings->DesktopWidth;
|
||||
|
||||
if (settings->percent_screen <= 0 || settings->percent_screen > 100)
|
||||
{
|
||||
printf("invalid geometry percentage\n");
|
||||
@ -326,7 +327,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
printf("missing keyboard layout id\n");
|
||||
return FREERDP_ARGS_PARSE_FAILURE;
|
||||
}
|
||||
sscanf(argv[index], "%X", &(settings->kbd_layout));
|
||||
sscanf(argv[index], "%X", &(settings->KeyboardLayout));
|
||||
}
|
||||
else if (strcmp("-K", argv[index]) == 0)
|
||||
{
|
||||
@ -489,7 +490,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
{
|
||||
settings->rfx_codec = TRUE;
|
||||
settings->fastpath_output = TRUE;
|
||||
settings->color_depth = 32;
|
||||
settings->ColorDepth = 32;
|
||||
settings->performance_flags = PERF_FLAG_NONE;
|
||||
settings->large_pointer = TRUE;
|
||||
}
|
||||
@ -601,17 +602,17 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
PERF_DISABLE_FULLWINDOWDRAG | PERF_DISABLE_MENUANIMATIONS |
|
||||
PERF_DISABLE_THEMING;
|
||||
|
||||
settings->connection_type = CONNECTION_TYPE_MODEM;
|
||||
settings->ConnectionType = CONNECTION_TYPE_MODEM;
|
||||
}
|
||||
else if (argv[index][0] == 'b') /* broadband */
|
||||
{
|
||||
settings->performance_flags = PERF_DISABLE_WALLPAPER;
|
||||
settings->connection_type = CONNECTION_TYPE_BROADBAND_HIGH;
|
||||
settings->ConnectionType = CONNECTION_TYPE_BROADBAND_HIGH;
|
||||
}
|
||||
else if (argv[index][0] == 'l') /* lan */
|
||||
{
|
||||
settings->performance_flags = PERF_FLAG_NONE;
|
||||
settings->connection_type = CONNECTION_TYPE_LAN;
|
||||
settings->ConnectionType = CONNECTION_TYPE_LAN;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -558,7 +558,7 @@ BOOL xf_peer_post_connect(freerdp_peer* client)
|
||||
printf("\n");
|
||||
|
||||
printf("Client requested desktop: %dx%dx%d\n",
|
||||
client->settings->width, client->settings->height, client->settings->color_depth);
|
||||
client->settings->DesktopWidth, client->settings->DesktopHeight, client->settings->ColorDepth);
|
||||
|
||||
if (!client->settings->rfx_codec)
|
||||
{
|
||||
@ -566,10 +566,10 @@ BOOL xf_peer_post_connect(freerdp_peer* client)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* A real server should tag the peer as activated here and start sending updates in mainloop. */
|
||||
/* A real server should tag the peer as activated here and start sending updates in main loop. */
|
||||
|
||||
client->settings->width = xfi->width;
|
||||
client->settings->height = xfi->height;
|
||||
client->settings->DesktopWidth = xfi->width;
|
||||
client->settings->DesktopHeight = xfi->height;
|
||||
|
||||
client->update->DesktopResize(client->update->context);
|
||||
xfp->activated = FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user