From 0f880bdb50624661d7790da36a74f4f251dac79c Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 6 Sep 2020 15:42:52 +0300 Subject: [PATCH] - removed obsolete code path in Cocoa IWAD picker Always use arch executable to restart GZDoom with additional command line parameters --- .../platform/posix/osx/iwadpicker_cocoa.mm | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/common/platform/posix/osx/iwadpicker_cocoa.mm b/src/common/platform/posix/osx/iwadpicker_cocoa.mm index 1a1c2ee80..9f4978b50 100644 --- a/src/common/platform/posix/osx/iwadpicker_cocoa.mm +++ b/src/common/platform/posix/osx/iwadpicker_cocoa.mm @@ -398,20 +398,9 @@ static void RestartWithParameters(const WadStuff& wad, NSString* parameters) NSString* executablePath = [NSString stringWithUTF8String:Args->GetArg(0)]; NSMutableArray* const arguments = [[NSMutableArray alloc] init]; - - // The following value shoud be equal to NSAppKitVersionNumber10_5 - // It's hard-coded in order to build with earlier SDKs - const bool canSelectArchitecture = NSAppKitVersionNumber >= 949; - - if (canSelectArchitecture) - { - [arguments addObject:@"-arch"]; - [arguments addObject:GetArchitectureString()]; - [arguments addObject:executablePath]; - - executablePath = @"/usr/bin/arch"; - } - + [arguments addObject:@"-arch"]; + [arguments addObject:GetArchitectureString()]; + [arguments addObject:executablePath]; [arguments addObject:@"-iwad"]; [arguments addObject:[NSString stringWithUTF8String:wad.Path]]; @@ -435,7 +424,7 @@ static void RestartWithParameters(const WadStuff& wad, NSString* parameters) wordfree(&expansion); } - [NSTask launchedTaskWithLaunchPath:executablePath + [NSTask launchedTaskWithLaunchPath:@"/usr/bin/arch" arguments:arguments]; _exit(0); // to avoid atexit()'s functions