From 30757ef2a089f8f1dab411cdc5c3baa8d5193f1b Mon Sep 17 00:00:00 2001 From: Jeremy Palmer Date: Mon, 4 Jul 2022 17:03:54 +1000 Subject: [PATCH] MacOS: set basepath to executablePath rather than one path above bundle Fixes an issue where the base path would typically be set to /Application if the bundle is installed into /Application/dhewm3.app. Now the default basepath will be /Application/dhewm3.app/Content/MacOS/ where the dhewm3 binary is located. --- neo/sys/osx/DOOMController.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neo/sys/osx/DOOMController.mm b/neo/sys/osx/DOOMController.mm index 5d3633845..5dbb9e872 100644 --- a/neo/sys/osx/DOOMController.mm +++ b/neo/sys/osx/DOOMController.mm @@ -194,7 +194,7 @@ int SDL_main( int argc, char *argv[] ) { Sys_Error("Could not access application resources"); // DG: set exe_path so Posix_InitSignalHandlers() can call Posix_GetExePath() - SDL_strlcpy(exe_path, [ [ [ NSBundle mainBundle ] bundlePath ] cString ], sizeof(exe_path)); + SDL_strlcpy(exe_path, [ [ [ NSBundle mainBundle ] executablePath ] cString ], sizeof(exe_path)); // same for save_path for Posix_GetSavePath() D3_snprintfC99(save_path, sizeof(save_path), "%s/Library/Application Support/dhewm3", [NSHomeDirectory() cString]); // and preinitializing basepath is easy enough so do that as well