Fixed mac app termination and warnings
This commit is contained in:
parent
0e0eb5f41f
commit
a2e9f5efcb
@ -864,8 +864,7 @@ BOOL mac_pre_connect(freerdp *instance)
|
||||
if (!settings->ServerHostname)
|
||||
{
|
||||
WLog_ERR(TAG, "error: server hostname was not specified with /v:<server>[:port]");
|
||||
[NSApp terminate:nil];
|
||||
return -1;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
settings->OsMajorType = OSMAJORTYPE_MACINTOSH;
|
||||
|
@ -73,6 +73,10 @@ void mac_set_view_size(rdpContext *context, MRDPView *view);
|
||||
|
||||
[window setTitle:winTitle];
|
||||
}
|
||||
else
|
||||
{
|
||||
[NSApp terminate:self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)applicationWillBecomeActive:(NSNotification *)notification
|
||||
@ -92,6 +96,7 @@ void mac_set_view_size(rdpContext *context, MRDPView *view);
|
||||
[mrdpView releaseResources];
|
||||
_singleDelegate = nil;
|
||||
NSLog(@"Stopped.\n");
|
||||
[NSApp terminate:self];
|
||||
}
|
||||
|
||||
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
return NSApplicationMain(argc, argv);
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
return NSApplicationMain(argc, (const char **)argv);
|
||||
return NSApplicationMain(argc, argv);
|
||||
}
|
||||
|
@ -62,6 +62,7 @@ static int mfreerdp_client_stop(rdpContext *context)
|
||||
{
|
||||
mfContext *mfc = (mfContext *)context;
|
||||
|
||||
freerdp_abort_connect(context->instance);
|
||||
if (mfc->thread)
|
||||
{
|
||||
SetEvent(mfc->stopEvent);
|
||||
@ -97,7 +98,6 @@ static BOOL mfreerdp_client_new(freerdp *instance, rdpContext *context)
|
||||
context->instance->LogonErrorInfo = mac_logon_error_info;
|
||||
context->instance->settings = instance->settings;
|
||||
settings = context->settings;
|
||||
settings->AsyncUpdate = TRUE;
|
||||
settings->AsyncInput = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user