macosx: fix build
This commit is contained in:
parent
54243abaec
commit
3a851b7021
@ -1020,37 +1020,37 @@ BOOL mac_pre_connect(freerdp *inst)
|
||||
int len;
|
||||
int i;
|
||||
|
||||
inst->settings->offscreen_bitmap_cache = FALSE;
|
||||
inst->settings->glyphSupportLevel = GLYPH_SUPPORT_FULL;
|
||||
inst->settings->order_support[NEG_GLYPH_INDEX_INDEX] = TRUE;
|
||||
inst->settings->order_support[NEG_FAST_GLYPH_INDEX] = FALSE;
|
||||
inst->settings->order_support[NEG_FAST_INDEX_INDEX] = FALSE;
|
||||
inst->settings->order_support[NEG_SCRBLT_INDEX] = TRUE;
|
||||
inst->settings->order_support[NEG_SAVEBITMAP_INDEX] = FALSE;
|
||||
inst->settings->OffscreenSupportLevel = FALSE;
|
||||
inst->settings->GlyphSupportLevel = GLYPH_SUPPORT_FULL;
|
||||
inst->settings->OrderSupport[NEG_GLYPH_INDEX_INDEX] = TRUE;
|
||||
inst->settings->OrderSupport[NEG_FAST_GLYPH_INDEX] = FALSE;
|
||||
inst->settings->OrderSupport[NEG_FAST_INDEX_INDEX] = FALSE;
|
||||
inst->settings->OrderSupport[NEG_SCRBLT_INDEX] = TRUE;
|
||||
inst->settings->OrderSupport[NEG_SAVEBITMAP_INDEX] = FALSE;
|
||||
|
||||
inst->settings->bitmap_cache = TRUE;
|
||||
inst->settings->order_support[NEG_MEMBLT_INDEX] = TRUE;
|
||||
inst->settings->order_support[NEG_MEMBLT_V2_INDEX] = TRUE;
|
||||
inst->settings->order_support[NEG_MEM3BLT_INDEX] = FALSE;
|
||||
inst->settings->order_support[NEG_MEM3BLT_V2_INDEX] = FALSE;
|
||||
inst->settings->bitmapCacheV2NumCells = 3; // 5;
|
||||
inst->settings->bitmapCacheV2CellInfo[0].numEntries = 0x78; // 600;
|
||||
inst->settings->bitmapCacheV2CellInfo[0].persistent = FALSE;
|
||||
inst->settings->bitmapCacheV2CellInfo[1].numEntries = 0x78; // 600;
|
||||
inst->settings->bitmapCacheV2CellInfo[1].persistent = FALSE;
|
||||
inst->settings->bitmapCacheV2CellInfo[2].numEntries = 0x150; // 2048;
|
||||
inst->settings->bitmapCacheV2CellInfo[2].persistent = FALSE;
|
||||
inst->settings->bitmapCacheV2CellInfo[3].numEntries = 0; // 4096;
|
||||
inst->settings->bitmapCacheV2CellInfo[3].persistent = FALSE;
|
||||
inst->settings->bitmapCacheV2CellInfo[4].numEntries = 0; // 2048;
|
||||
inst->settings->bitmapCacheV2CellInfo[4].persistent = FALSE;
|
||||
inst->settings->BitmapCacheEnabled = TRUE;
|
||||
inst->settings->OrderSupport[NEG_MEMBLT_INDEX] = TRUE;
|
||||
inst->settings->OrderSupport[NEG_MEMBLT_V2_INDEX] = TRUE;
|
||||
inst->settings->OrderSupport[NEG_MEM3BLT_INDEX] = FALSE;
|
||||
inst->settings->OrderSupport[NEG_MEM3BLT_V2_INDEX] = FALSE;
|
||||
inst->settings->BitmapCacheV2NumCells = 3; // 5;
|
||||
inst->settings->BitmapCacheV2CellInfo[0].numEntries = 0x78; // 600;
|
||||
inst->settings->BitmapCacheV2CellInfo[0].persistent = FALSE;
|
||||
inst->settings->BitmapCacheV2CellInfo[1].numEntries = 0x78; // 600;
|
||||
inst->settings->BitmapCacheV2CellInfo[1].persistent = FALSE;
|
||||
inst->settings->BitmapCacheV2CellInfo[2].numEntries = 0x150; // 2048;
|
||||
inst->settings->BitmapCacheV2CellInfo[2].persistent = FALSE;
|
||||
inst->settings->BitmapCacheV2CellInfo[3].numEntries = 0; // 4096;
|
||||
inst->settings->BitmapCacheV2CellInfo[3].persistent = FALSE;
|
||||
inst->settings->BitmapCacheV2CellInfo[4].numEntries = 0; // 2048;
|
||||
inst->settings->BitmapCacheV2CellInfo[4].persistent = FALSE;
|
||||
|
||||
inst->settings->order_support[NEG_MULTIDSTBLT_INDEX] = FALSE;
|
||||
inst->settings->order_support[NEG_MULTIPATBLT_INDEX] = FALSE;
|
||||
inst->settings->order_support[NEG_MULTISCRBLT_INDEX] = FALSE;
|
||||
inst->settings->order_support[NEG_MULTIOPAQUERECT_INDEX] = FALSE;
|
||||
inst->settings->order_support[NEG_POLYLINE_INDEX] = FALSE;
|
||||
inst->settings->color_depth = 24;
|
||||
inst->settings->OrderSupport[NEG_MULTIDSTBLT_INDEX] = FALSE;
|
||||
inst->settings->OrderSupport[NEG_MULTIPATBLT_INDEX] = FALSE;
|
||||
inst->settings->OrderSupport[NEG_MULTISCRBLT_INDEX] = FALSE;
|
||||
inst->settings->OrderSupport[NEG_MULTIOPAQUERECT_INDEX] = FALSE;
|
||||
inst->settings->OrderSupport[NEG_POLYLINE_INDEX] = FALSE;
|
||||
inst->settings->ColorDepth = 24;
|
||||
inst->settings->SoftwareGdi = 1;
|
||||
|
||||
// setup callbacks
|
||||
@ -1177,10 +1177,10 @@ BOOL mac_pre_connect(freerdp *inst)
|
||||
|
||||
// get dimensions of screen that has keyboard focus;
|
||||
// we use these dimensions when connecting to RDP server
|
||||
inst->settings->width = [[NSScreen mainScreen] frame].size.width;
|
||||
inst->settings->height = [[NSScreen mainScreen] frame].size.height - g_mrdpview->titleBarHeight;
|
||||
g_mrdpview->width = inst->settings->width;
|
||||
g_mrdpview->height = inst->settings->height;
|
||||
inst->settings->DesktopWidth = [[NSScreen mainScreen] frame].size.width;
|
||||
inst->settings->DesktopHeight = [[NSScreen mainScreen] frame].size.height - g_mrdpview->titleBarHeight;
|
||||
g_mrdpview->width = inst->settings->DesktopWidth;
|
||||
g_mrdpview->height = inst->settings->DesktopHeight;
|
||||
|
||||
for (NSString * str in args)
|
||||
{
|
||||
@ -1220,7 +1220,7 @@ BOOL mac_pre_connect(freerdp *inst)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
[g_mrdpview setViewSize:inst->settings->width :inst->settings->height];
|
||||
[g_mrdpview setViewSize:inst->settings->DesktopWidth :inst->settings->DesktopHeight];
|
||||
|
||||
freerdp_channels_pre_connect(inst->context->channels, inst);
|
||||
return TRUE;
|
||||
|
@ -45,6 +45,17 @@
|
||||
#include <freerdp/utils/args.h>
|
||||
#include <freerdp/utils/passphrase.h>
|
||||
|
||||
void local_freerdp_device_collection_add(rdpSettings* settings, RDPDR_DEVICE* device)
|
||||
{
|
||||
if (settings->DeviceArraySize < (settings->DeviceCount + 1))
|
||||
{
|
||||
settings->DeviceArraySize *= 2;
|
||||
settings->DeviceArray = (RDPDR_DEVICE**) realloc(settings->DeviceArray, settings->DeviceArraySize);
|
||||
}
|
||||
|
||||
settings->DeviceArray[settings->DeviceCount++] = device;
|
||||
}
|
||||
|
||||
void freerdp_parse_hostname(rdpSettings* settings, char* hostname)
|
||||
{
|
||||
char* p;
|
||||
@ -779,7 +790,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
drive->Name = _strdup(data->data[1]);
|
||||
drive->Path = _strdup(data->data[2]);
|
||||
|
||||
freerdp_device_collection_add(settings, (RDPDR_DEVICE*) drive);
|
||||
local_freerdp_device_collection_add(settings, (RDPDR_DEVICE*) drive);
|
||||
}
|
||||
else if (strcmp(data->data[0], "printer") == 0)
|
||||
{
|
||||
@ -794,7 +805,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
if (data->data[2])
|
||||
printer->DriverName = _strdup(data->data[2]);
|
||||
|
||||
freerdp_device_collection_add(settings, (RDPDR_DEVICE*) printer);
|
||||
local_freerdp_device_collection_add(settings, (RDPDR_DEVICE*) printer);
|
||||
}
|
||||
else if (strcmp(data->data[0], "smartcard") == 0)
|
||||
{
|
||||
@ -807,7 +818,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
smartcard->Name = _strdup(data->data[1]);
|
||||
smartcard->Path = _strdup(data->data[2]);
|
||||
|
||||
freerdp_device_collection_add(settings, (RDPDR_DEVICE*) smartcard);
|
||||
local_freerdp_device_collection_add(settings, (RDPDR_DEVICE*) smartcard);
|
||||
}
|
||||
else if (strcmp(data->data[0], "serial") == 0)
|
||||
{
|
||||
@ -820,7 +831,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
serial->Name = _strdup(data->data[1]);
|
||||
serial->Path = _strdup(data->data[2]);
|
||||
|
||||
freerdp_device_collection_add(settings, (RDPDR_DEVICE*) serial);
|
||||
local_freerdp_device_collection_add(settings, (RDPDR_DEVICE*) serial);
|
||||
}
|
||||
else if (strcmp(data->data[0], "parallel") == 0)
|
||||
{
|
||||
@ -833,7 +844,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
parallel->Name = _strdup(data->data[1]);
|
||||
parallel->Path = _strdup(data->data[2]);
|
||||
|
||||
freerdp_device_collection_add(settings, (RDPDR_DEVICE*) parallel);
|
||||
local_freerdp_device_collection_add(settings, (RDPDR_DEVICE*) parallel);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -45,8 +45,8 @@ void mf_peer_context_new(freerdp_peer* client, mfPeerContext* context)
|
||||
{
|
||||
context->rfx_context = rfx_context_new();
|
||||
context->rfx_context->mode = RLGR3;
|
||||
context->rfx_context->width = client->settings->width;
|
||||
context->rfx_context->height = client->settings->height;
|
||||
context->rfx_context->width = client->settings->DesktopWidth;
|
||||
context->rfx_context->height = client->settings->DesktopHeight;
|
||||
rfx_context_set_pixel_format(context->rfx_context, RDP_PIXEL_FORMAT_R8G8B8);
|
||||
|
||||
context->nsc_context = nsc_context_new();
|
||||
@ -102,7 +102,7 @@ BOOL mf_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);
|
||||
|
||||
/* Iterate all channel names requested by the client and activate those supported by the server */
|
||||
|
||||
|
@ -22,6 +22,10 @@
|
||||
#endif
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include <sys/select.h>
|
||||
#include <sys/signal.h>
|
||||
|
||||
#include <freerdp/utils/sleep.h>
|
||||
|
||||
#include "xf_encode.h"
|
||||
|
Loading…
Reference in New Issue
Block a user