diff options
Diffstat (limited to 'tw/packages/files/simutrans-paths.patch')
-rw-r--r-- | tw/packages/files/simutrans-paths.patch | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tw/packages/files/simutrans-paths.patch b/tw/packages/files/simutrans-paths.patch new file mode 100644 index 00000000..bfc0db4a --- /dev/null +++ b/tw/packages/files/simutrans-paths.patch @@ -0,0 +1,18 @@ +This patch stores user-specific config in $XDG_CONFIG_HOME/simutrans +rather than ~/simutrans. + +--- a/sys/simsys.cc 2022-09-25 01:36:18.951636483 +0200 ++++ b/sys/simsys.cc 2022-09-25 01:36:44.615457050 +0200 +@@ -395,7 +395,11 @@ + #elif defined __ANDROID__ + tstrncpy(buffer,SDL_GetPrefPath("Simutrans Team","simutrans"),lengthof(buffer)); + #else +- sprintf(buffer, "%s/simutrans", getenv("HOME")); ++ if (getenv("XDG_CONFIG_HOME") == NULL) { ++ sprintf(buffer, "%s/.config/simutrans", getenv("HOME")); ++ } else { ++ sprintf(buffer, "%s/simutrans", getenv("XDG_CONFIG_HOME")); ++ } + #endif + + // create directory and subdirectories |