From 06f452e7bdb239398b59021f16ab453b724fdc17 Mon Sep 17 00:00:00 2001 From: Christian Speckner Date: Sun, 18 Aug 2019 22:10:02 +0200 Subject: [PATCH] Remove unecessary cwd logic. --- src/macos/SDLMain.m | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/macos/SDLMain.m b/src/macos/SDLMain.m index f175608aa..bd97ec4be 100644 --- a/src/macos/SDLMain.m +++ b/src/macos/SDLMain.m @@ -25,24 +25,6 @@ static SDLMain* sharedInstance = nil; return sharedInstance; } - -// ---------------------------------------------------------------------------- -// Set the working directory to the .app's parent directory -- (void) setupWorkingDirectory -{ - char parentdir[MAXPATHLEN]; - - CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle()); - CFURLRef url2 = CFURLCreateCopyDeletingLastPathComponent(0, url); - if (CFURLGetFileSystemRepresentation(url2, 1, (UInt8*)parentdir, MAXPATHLEN)) - { - chdir(parentdir); /* chdir to the binary app's parent */ - } - CFRelease(url); - CFRelease(url2); -} - - // ---------------------------------------------------------------------------- /** * Catch document open requests...this lets us notice files when the app @@ -75,9 +57,6 @@ static SDLMain* sharedInstance = nil; { int status; - // Set the working directory to the .app's parent directory - [self setupWorkingDirectory]; - calledMainline = TRUE; if (openFilename) {