Merge branch 'master' of github.com:FreeRDP/FreeRDP
This commit is contained in:
commit
8fb7e80919
@ -19,7 +19,7 @@
|
||||
// set title and tab-bar image
|
||||
[self setTitle:NSLocalizedString(@"About", @"About Controller title")];
|
||||
UIImage* tabBarIcon = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"tabbar_icon_about" ofType:@"png"]];
|
||||
[self setTabBarItem:[[UITabBarItem alloc] initWithTitle:NSLocalizedString(@"About", @"Tabbar item about") image:tabBarIcon tag:0]];
|
||||
[self setTabBarItem:[[[UITabBarItem alloc] initWithTitle:NSLocalizedString(@"About", @"Tabbar item about") image:tabBarIcon tag:0] autorelease]];
|
||||
|
||||
last_link_clicked = nil;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
||||
if ((self = [super initWithStyle:style]))
|
||||
{
|
||||
UIImage* tabBarIcon = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"tabbar_icon_settings" ofType:@"png"]];
|
||||
[self setTabBarItem:[[UITabBarItem alloc] initWithTitle:NSLocalizedString(@"Settings", @"Tabbar item settings") image:tabBarIcon tag:0]];
|
||||
[self setTabBarItem:[[[UITabBarItem alloc] initWithTitle:NSLocalizedString(@"Settings", @"Tabbar item settings") image:tabBarIcon tag:0] autorelease]];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -59,7 +59,7 @@
|
||||
|
||||
// set title and tabbar controller image
|
||||
[self setTitle:NSLocalizedString(@"Connections", @"'Connections': bookmark controller title")];
|
||||
[self setTabBarItem:[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemBookmarks tag:0]];
|
||||
[self setTabBarItem:[[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemBookmarks tag:0] autorelease]];
|
||||
|
||||
// load images
|
||||
_star_on_img = [[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"icon_accessory_star_on" ofType:@"png"]] retain];
|
||||
@ -152,6 +152,9 @@
|
||||
[_manual_bookmarks release];
|
||||
[_tsxconnect_bookmarks release];
|
||||
|
||||
[_star_on_img release];
|
||||
[_star_off_img release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@ -451,7 +454,7 @@
|
||||
{
|
||||
// resume session
|
||||
RDPSession* session = [_active_sessions objectAtIndex:[indexPath row]];
|
||||
UIViewController* ctrl = [[RDPSessionViewController alloc] initWithNibName:@"RDPSessionView" bundle:nil session:session];
|
||||
UIViewController* ctrl = [[[RDPSessionViewController alloc] initWithNibName:@"RDPSessionView" bundle:nil session:session] autorelease];
|
||||
[ctrl setHidesBottomBarWhenPushed:YES];
|
||||
[[self navigationController] pushViewController:ctrl animated:YES];
|
||||
}
|
||||
@ -466,7 +469,8 @@
|
||||
if ([[_searchBar text] length] == 0)
|
||||
{
|
||||
// show add bookmark controller
|
||||
BookmarkEditorController* bookmarkEditorController = [[[BookmarkEditorController alloc] initWithBookmark:[[ComputerBookmark alloc] initWithBaseDefaultParameters]] autorelease];
|
||||
ComputerBookmark *bookmark = [[[ComputerBookmark alloc] initWithBaseDefaultParameters] autorelease];
|
||||
BookmarkEditorController* bookmarkEditorController = [[[BookmarkEditorController alloc] initWithBookmark:bookmark] autorelease];
|
||||
[bookmarkEditorController setTitle:NSLocalizedString(@"Add Connection", @"Add Connection title")];
|
||||
[bookmarkEditorController setDelegate:self];
|
||||
[bookmarkEditorController setHidesBottomBarWhenPushed:YES];
|
||||
@ -509,7 +513,7 @@
|
||||
{
|
||||
// create rdp session
|
||||
RDPSession* session = [[[RDPSession alloc] initWithBookmark:bookmark] autorelease];
|
||||
UIViewController* ctrl = [[RDPSessionViewController alloc] initWithNibName:@"RDPSessionView" bundle:nil session:session];
|
||||
UIViewController* ctrl = [[[RDPSessionViewController alloc] initWithNibName:@"RDPSessionView" bundle:nil session:session] autorelease];
|
||||
[ctrl setHidesBottomBarWhenPushed:YES];
|
||||
[[self navigationController] pushViewController:ctrl animated:YES];
|
||||
[_active_sessions addObject:session];
|
||||
|
@ -19,7 +19,7 @@
|
||||
// set title and tab-bar image
|
||||
[self setTitle:NSLocalizedString(@"Help", @"Help Controller title")];
|
||||
UIImage* tabBarIcon = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"tabbar_icon_help" ofType:@"png"]];
|
||||
[self setTabBarItem:[[UITabBarItem alloc] initWithTitle:NSLocalizedString(@"Help", @"Tabbar item help") image:tabBarIcon tag:0]];
|
||||
[self setTabBarItem:[[[UITabBarItem alloc] initWithTitle:NSLocalizedString(@"Help", @"Tabbar item help") image:tabBarIcon tag:0] autorelease]];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -51,6 +51,7 @@
|
||||
if (ret)
|
||||
{
|
||||
NSLog(@"%s: CCKeyDerivationPBKDF ret == %d, indicating some sort of failure.", __func__, ret);
|
||||
free(derived_key);
|
||||
[self autorelease];
|
||||
return nil;
|
||||
}
|
||||
@ -64,6 +65,7 @@
|
||||
if (ret != 1)
|
||||
{
|
||||
NSLog(@"%s: PKCS5_PBKDF2_HMAC_SHA1 ret == %lu, indicating some sort of failure.", __func__, ret);
|
||||
free(derived_key);
|
||||
[self release];
|
||||
return nil;
|
||||
}
|
||||
|
@ -52,6 +52,7 @@ BOOL CALLBACK moncb(HMONITOR hMonitor, HDC hdcMonitor, LPRECT lprcMonitor, LPARA
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
BOOL screen_selected = FALSE;
|
||||
int index;
|
||||
wfServer* server;
|
||||
|
||||
@ -108,6 +109,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
if (strcmp("--screen", argv[index]) == 0)
|
||||
{
|
||||
screen_selected = TRUE;
|
||||
index++;
|
||||
if (index == argc)
|
||||
{
|
||||
@ -127,6 +129,38 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (screen_selected == FALSE)
|
||||
{
|
||||
_TCHAR name[128];
|
||||
int width;
|
||||
int height;
|
||||
int bpp;
|
||||
int i;
|
||||
|
||||
_tprintf(_T("screen id not provided. attempting to detect...\n"));
|
||||
_tprintf(_T("Detecting screens...\n"));
|
||||
_tprintf(_T("\nID\tResolution\t\tName (Interface)\n\n"));
|
||||
|
||||
for (i=0; ; i++)
|
||||
{
|
||||
if (get_screen_info(i, name, &width, &height, &bpp) != 0)
|
||||
{
|
||||
if ( (width * height * bpp) == 0 )
|
||||
continue;
|
||||
|
||||
_tprintf(_T("%d\t%dx%dx%d\t"), i, width, height, bpp);
|
||||
_tprintf(_T("%s\n"), name);
|
||||
set_screen_id(i);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
printf("Starting server\n");
|
||||
|
||||
wfreerdp_server_start(server);
|
||||
|
@ -50,7 +50,7 @@ int get_screen_info(int id, _TCHAR* name, int* width, int* height, int* bpp)
|
||||
if (name != NULL)
|
||||
_stprintf(name, _T("%s (%s)"), dd.DeviceName, dd.DeviceString);
|
||||
|
||||
dc = CreateDC(NULL, dd.DeviceName, NULL, NULL);
|
||||
dc = CreateDC(dd.DeviceName, NULL, NULL, NULL);
|
||||
*width = GetDeviceCaps(dc, HORZRES);
|
||||
*height = GetDeviceCaps(dc, VERTRES);
|
||||
*bpp = GetDeviceCaps(dc, BITSPIXEL);
|
||||
|
@ -187,29 +187,7 @@ BOOL wf_mirror_driver_update(wfInfo* wfi, int mode)
|
||||
LONG disp_change_status;
|
||||
DWORD dmf_devmodewext_magic_sig = 0xDF20C0DE;
|
||||
|
||||
if (mode == MIRROR_LOAD)
|
||||
{
|
||||
//first let's get the virtual screen dimentions
|
||||
wfi->virtscreen_width = GetSystemMetrics(SM_CXVIRTUALSCREEN);
|
||||
wfi->virtscreen_height = GetSystemMetrics(SM_CYVIRTUALSCREEN);
|
||||
|
||||
/*
|
||||
* Will have to come back to this for supporting non primary displays and multimonitor setups
|
||||
*/
|
||||
/*dc = GetDC(NULL);
|
||||
wfi->servscreen_width = GetDeviceCaps(dc, HORZRES);
|
||||
wfi->servscreen_height = GetDeviceCaps(dc, VERTRES);
|
||||
wfi->bitsPerPixel = GetDeviceCaps(dc, BITSPIXEL);
|
||||
ReleaseDC(NULL, dc);*/
|
||||
|
||||
}
|
||||
else if (mode == MIRROR_UNLOAD)
|
||||
{
|
||||
wfi->servscreen_width = 0;
|
||||
wfi->servscreen_height = 0;
|
||||
wfi->bitsPerPixel = 0;
|
||||
}
|
||||
else
|
||||
if ( (mode != MIRROR_LOAD) && (mode != MIRROR_UNLOAD) )
|
||||
{
|
||||
printf("Invalid mirror mode!\n");
|
||||
return FALSE;
|
||||
@ -227,11 +205,17 @@ BOOL wf_mirror_driver_update(wfInfo* wfi, int mode)
|
||||
deviceMode->dmSize = sizeof(DEVMODE);
|
||||
deviceMode->dmDriverExtra = drvExtraSaved;
|
||||
|
||||
deviceMode->dmPelsWidth = wfi->virtscreen_width;
|
||||
deviceMode->dmPelsHeight = wfi->virtscreen_height;
|
||||
deviceMode->dmBitsPerPel = wfi->bitsPerPixel;
|
||||
deviceMode->dmPosition.x = wfi->servscreen_xoffset;
|
||||
deviceMode->dmPosition.y = wfi->servscreen_yoffset;
|
||||
if (mode == MIRROR_LOAD)
|
||||
{
|
||||
wfi->virtscreen_width = GetSystemMetrics(SM_CXVIRTUALSCREEN);
|
||||
wfi->virtscreen_height = GetSystemMetrics(SM_CYVIRTUALSCREEN);
|
||||
|
||||
deviceMode->dmPelsWidth = wfi->virtscreen_width;
|
||||
deviceMode->dmPelsHeight = wfi->virtscreen_height;
|
||||
deviceMode->dmBitsPerPel = wfi->bitsPerPixel;
|
||||
deviceMode->dmPosition.x = wfi->servscreen_xoffset;
|
||||
deviceMode->dmPosition.y = wfi->servscreen_yoffset;
|
||||
}
|
||||
|
||||
deviceMode->dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_POSITION;
|
||||
|
||||
|
@ -85,6 +85,7 @@ BOOL wf_peer_post_connect(freerdp_peer* client)
|
||||
(wfi->bitsPerPixel == 0) )
|
||||
{
|
||||
_tprintf(_T("postconnect: error getting screen info for screen %d\n"), wfi->screenID);
|
||||
_tprintf(_T("\t%dx%dx%d\n"), wfi->servscreen_height, wfi->servscreen_width, wfi->bitsPerPixel);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -224,6 +225,14 @@ DWORD WINAPI wf_peer_main_loop(LPVOID lpParam)
|
||||
wfPeerContext* context;
|
||||
freerdp_peer* client = (freerdp_peer*) lpParam;
|
||||
|
||||
if (!getenv("HOME"))
|
||||
{
|
||||
char home[MAX_PATH * 2] = "HOME=";
|
||||
strcat(home, getenv("HOMEDRIVE"));
|
||||
strcat(home, getenv("HOMEPATH"));
|
||||
_putenv(home);
|
||||
}
|
||||
|
||||
wf_peer_init(client);
|
||||
|
||||
settings = client->settings;
|
||||
|
@ -29,6 +29,10 @@
|
||||
#include <winpr/error.h>
|
||||
#include <winpr/handle.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
|
||||
/* Mutex */
|
||||
@ -271,5 +275,9 @@ WINPR_API HANDLE CreateWaitObjectEvent(LPSECURITY_ATTRIBUTES lpEventAttributes,
|
||||
WINPR_API int GetEventFileDescriptor(HANDLE hEvent);
|
||||
WINPR_API void* GetEventWaitObject(HANDLE hEvent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* WINPR_SYNCH_H */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user