mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
Stop using deprecated APIs on macOS in server launcher
(cherry picked from commit dcbd8197a4
)
This commit is contained in:
parent
94bbe2bc09
commit
dae85e244c
|
@ -9,7 +9,7 @@
|
|||
@end
|
||||
|
||||
@implementation ServerView
|
||||
- (void)listenTo: (NSTask*)t;
|
||||
- (void)listenTo: (NSTask *)t
|
||||
{
|
||||
NSPipe *pipe;
|
||||
task = t;
|
||||
|
@ -58,14 +58,10 @@ void runServer()
|
|||
NSOpenPanel *openDlg = [NSOpenPanel openPanel];
|
||||
[openDlg setCanChooseFiles:YES];
|
||||
|
||||
if([openDlg runModalForDirectory:nil file:nil] != NSOKButton)
|
||||
if([openDlg runModal] != NSOKButton)
|
||||
return;
|
||||
|
||||
NSArray* filenames = [openDlg filenames];
|
||||
if([filenames count] != 1)
|
||||
return;
|
||||
|
||||
NSString* filename = [filenames objectAtIndex: 0];
|
||||
NSString *filename = [[openDlg URL] path];
|
||||
NSArray *arguments = [NSArray arrayWithObjects: @"-f", filename, nil];
|
||||
|
||||
// run server
|
||||
|
|
Loading…
Reference in a new issue