summaryrefslogtreecommitdiff
path: root/src/port/Game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/port/Game.cpp')
-rw-r--r--src/port/Game.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/port/Game.cpp b/src/port/Game.cpp
index 9804fe324..c1afe80b1 100644
--- a/src/port/Game.cpp
+++ b/src/port/Game.cpp
@@ -1035,6 +1035,14 @@ extern "C"
CFPreferencesSetAppValue(CFSTR("ApplePressAndHoldEnabled"), kCFBooleanFalse, kCFPreferencesCurrentApplication);
CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
#endif
+#if defined(__APPLE__) && !defined(PLATFORM_IOS)
+ // Default the writable data folder to ~/Library/Application Support/SpaghettiKart
+ // (libultraship expands the ~ and creates the directory). Without this, a Finder
+ // launch has no SHIP_HOME and libultraship falls back to the current working
+ // directory, scattering config/saves/mods into the user's home folder.
+ // overwrite=0 keeps any SHIP_HOME the user already set.
+ setenv("SHIP_HOME", "~/Library/Application Support/SpaghettiKart", 0);
+#endif
// load_wasm();
GameEngine::Create();
audio_init();