CocoaSplit/CocoaSplitCmd/CmdLineDelegate.m
Zakk 7b2aa0416c Remove some NSLogs
Rework Desktop capture display enumeration to take into account displays with no serial number (thanks apple)
2019-06-22 04:46:21 -04:00

55 lines
1 KiB
Objective-C

//
// CmdLineDelegate.m
// CocoaSplit
//
// Created by Zakk on 4/8/13.
// Copyright (c) 2013 Zakk. All rights reserved.
//
#import "CmdLineDelegate.h"
@implementation CmdLineDelegate
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
NSUserDefaults *cmdargs = [NSUserDefaults standardUserDefaults];
BOOL loadSavedSettings = YES;
loadSavedSettings = [cmdargs boolForKey:@"loadSettings"];
if ([cmdargs objectForKey:@"loadSettings"])
{
loadSavedSettings = [cmdargs boolForKey:@"loadSettings"];
}
if (loadSavedSettings == YES)
{
[self.captureController loadSettings];
}
[self.captureController loadCmdlineSettings:cmdargs];
[[NSProcessInfo processInfo] disableSuddenTermination];
[self.captureController startStream];
}
-(NSApplicationTerminateReply) applicationShouldTerminate: (NSNotification *)notification
{
[self.captureController stopStream];
return NSTerminateNow;
}
@end