summarylogtreecommitdiffstats
path: root/0001-Fix-file-paths.patch
diff options
context:
space:
mode:
authorJan Cholasta2020-02-25 13:34:01 +0100
committerJan Cholasta2020-02-25 13:34:01 +0100
commit0c958707c6be9f0b05bd7a83f4a8dc1f0d063eb3 (patch)
treeca9e6814c7662e503afca6290d70459b047e2702 /0001-Fix-file-paths.patch
parent176d666560acf73c02bfb7c1ce723c9f6bd88d9e (diff)
downloadaur-0c958707c6be9f0b05bd7a83f4a8dc1f0d063eb3.tar.gz
gzdoom-git-4.4pre+72+g56311b765-1
Diffstat (limited to '0001-Fix-file-paths.patch')
-rw-r--r--0001-Fix-file-paths.patch93
1 files changed, 93 insertions, 0 deletions
diff --git a/0001-Fix-file-paths.patch b/0001-Fix-file-paths.patch
new file mode 100644
index 000000000000..83c5a9e0f1ff
--- /dev/null
+++ b/0001-Fix-file-paths.patch
@@ -0,0 +1,93 @@
+From 9def07d1ab571430ee97c3db3022b5ba647b3f21 Mon Sep 17 00:00:00 2001
+From: Jan Cholasta <jan@cholasta.net>
+Date: Tue, 25 Feb 2020 12:53:07 +0100
+Subject: [PATCH] Fix file paths
+
+---
+ src/gameconfigfile.cpp | 14 ++------------
+ src/posix/sdl/i_main.cpp | 14 +-------------
+ src/sound/music/i_soundfont.cpp | 4 +---
+ 3 files changed, 4 insertions(+), 28 deletions(-)
+
+diff --git a/src/gameconfigfile.cpp b/src/gameconfigfile.cpp
+index a04264dbe..55e66bc4c 100644
+--- a/src/gameconfigfile.cpp
++++ b/src/gameconfigfile.cpp
+@@ -108,8 +108,6 @@ FGameConfigFile::FGameConfigFile ()
+ // Arch Linux likes them in /usr/share/doom
+ // Debian likes them in /usr/share/games/doom
+ // I assume other distributions don't do anything radically different
+- SetValueForKey ("Path", "/usr/local/share/doom", true);
+- SetValueForKey ("Path", "/usr/local/share/games/doom", true);
+ SetValueForKey ("Path", "/usr/share/doom", true);
+ SetValueForKey ("Path", "/usr/share/games/doom", true);
+ #endif
+@@ -129,8 +127,6 @@ FGameConfigFile::FGameConfigFile ()
+ #else
+ SetValueForKey ("Path", "$HOME/" GAME_DIR, true);
+ SetValueForKey ("Path", SHARE_DIR, true);
+- SetValueForKey ("Path", "/usr/local/share/doom", true);
+- SetValueForKey ("Path", "/usr/local/share/games/doom", true);
+ SetValueForKey ("Path", "/usr/share/doom", true);
+ SetValueForKey ("Path", "/usr/share/games/doom", true);
+ #endif
+@@ -156,14 +152,8 @@ FGameConfigFile::FGameConfigFile ()
+ #else
+ SetValueForKey("Path", "$HOME/" GAME_DIR "/soundfonts", true);
+ SetValueForKey("Path", "$HOME/" GAME_DIR "/fm_banks", true);
+- SetValueForKey("Path", "/usr/local/share/doom/soundfonts", true);
+- SetValueForKey("Path", "/usr/local/share/doom/fm_banks", true);
+- SetValueForKey("Path", "/usr/local/share/games/doom/soundfonts", true);
+- SetValueForKey("Path", "/usr/local/share/games/doom/fm_banks", true);
+- SetValueForKey("Path", "/usr/share/doom/soundfonts", true);
+- SetValueForKey("Path", "/usr/share/doom/fm_banks", true);
+- SetValueForKey("Path", "/usr/share/games/doom/soundfonts", true);
+- SetValueForKey("Path", "/usr/share/games/doom/fm_banks", true);
++ SetValueForKey("Path", "/usr/share/" GAMENAMELOWERCASE "/soundfonts", true);
++ SetValueForKey("Path", "/usr/share/" GAMENAMELOWERCASE "/fm_banks", true);
+ #endif
+ }
+
+diff --git a/src/posix/sdl/i_main.cpp b/src/posix/sdl/i_main.cpp
+index 9004dc0a3..a88dfcf18 100644
+--- a/src/posix/sdl/i_main.cpp
++++ b/src/posix/sdl/i_main.cpp
+@@ -187,19 +187,7 @@ int main (int argc, char **argv)
+ Args = new FArgs(argc, argv);
+
+ // Should we even be doing anything with progdir on Unix systems?
+- char program[PATH_MAX];
+- if (realpath (argv[0], program) == NULL)
+- strcpy (program, argv[0]);
+- char *slash = strrchr (program, '/');
+- if (slash != NULL)
+- {
+- *(slash + 1) = '\0';
+- progdir = program;
+- }
+- else
+- {
+- progdir = "./";
+- }
++ progdir = "/usr/lib/gzdoom/";
+
+ I_StartupJoysticks();
+
+diff --git a/src/sound/music/i_soundfont.cpp b/src/sound/music/i_soundfont.cpp
+index 400f92cb6..41896ae32 100644
+--- a/src/sound/music/i_soundfont.cpp
++++ b/src/sound/music/i_soundfont.cpp
+@@ -231,9 +231,7 @@ FPatchSetReader::FPatchSetReader(const char *filename)
+ #ifndef _WIN32
+ mCaseSensitivePaths = true;
+ const char *paths[] = {
+- "/usr/local/lib/timidity",
+- "/etc/timidity",
+- "/etc"
++ "/etc/timidity++"
+ };
+ #else
+ const char *paths[] = {
+--
+2.25.0
+