summarylogtreecommitdiffstats
path: root/0001-Fix-file-paths.patch
diff options
context:
space:
mode:
authorJan Cholasta2020-06-06 08:13:06 +0200
committerJan Cholasta2020-06-06 08:13:06 +0200
commitf013f122364fe8453762a2421625b8f3b670f8be (patch)
tree968cb631f5ccafe52416fc665a1d4edd38e9dcd8 /0001-Fix-file-paths.patch
parent8c0161515bd6ca5f8d64672654f1fc03e0022df7 (diff)
downloadaur-f013f122364fe8453762a2421625b8f3b670f8be.tar.gz
gzdoom-git-4.4pre+531+g9bf0f9bbf-1
Diffstat (limited to '0001-Fix-file-paths.patch')
-rw-r--r--0001-Fix-file-paths.patch68
1 files changed, 34 insertions, 34 deletions
diff --git a/0001-Fix-file-paths.patch b/0001-Fix-file-paths.patch
index f87860eed411..0d4124f1d201 100644
--- a/0001-Fix-file-paths.patch
+++ b/0001-Fix-file-paths.patch
@@ -1,12 +1,12 @@
-From d52c1fbe2904fb301cc902e3f5523f9ea8f712ce Mon Sep 17 00:00:00 2001
+From 401bce4a69d773cbacc28df57004155204dbe707 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/common/audio/music/i_soundfont.cpp | 4 +---
- src/gameconfigfile.cpp | 14 ++------------
- src/posix/sdl/i_main.cpp | 14 +-------------
+ src/common/audio/music/i_soundfont.cpp | 4 +---
+ src/common/platform/posix/sdl/i_main.cpp | 14 +-------------
+ src/gameconfigfile.cpp | 14 ++------------
3 files changed, 4 insertions(+), 28 deletions(-)
diff --git a/src/common/audio/music/i_soundfont.cpp b/src/common/audio/music/i_soundfont.cpp
@@ -24,11 +24,36 @@ index a8b4e9fdf..911b8e308 100644
};
#else
const char *paths[] = {
+diff --git a/src/common/platform/posix/sdl/i_main.cpp b/src/common/platform/posix/sdl/i_main.cpp
+index 7fc179a51..f39a38440 100644
+--- a/src/common/platform/posix/sdl/i_main.cpp
++++ b/src/common/platform/posix/sdl/i_main.cpp
+@@ -129,19 +129,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/gameconfigfile.cpp b/src/gameconfigfile.cpp
-index a04264dbe..55e66bc4c 100644
+index 7f7e55a21..8dfd6a9b3 100644
--- a/src/gameconfigfile.cpp
+++ b/src/gameconfigfile.cpp
-@@ -108,8 +108,6 @@ FGameConfigFile::FGameConfigFile ()
+@@ -109,8 +109,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
@@ -37,7 +62,7 @@ index a04264dbe..55e66bc4c 100644
SetValueForKey ("Path", "/usr/share/doom", true);
SetValueForKey ("Path", "/usr/share/games/doom", true);
#endif
-@@ -129,8 +127,6 @@ FGameConfigFile::FGameConfigFile ()
+@@ -130,8 +128,6 @@ FGameConfigFile::FGameConfigFile ()
#else
SetValueForKey ("Path", "$HOME/" GAME_DIR, true);
SetValueForKey ("Path", SHARE_DIR, true);
@@ -46,7 +71,7 @@ index a04264dbe..55e66bc4c 100644
SetValueForKey ("Path", "/usr/share/doom", true);
SetValueForKey ("Path", "/usr/share/games/doom", true);
#endif
-@@ -156,14 +152,8 @@ FGameConfigFile::FGameConfigFile ()
+@@ -157,14 +153,8 @@ FGameConfigFile::FGameConfigFile ()
#else
SetValueForKey("Path", "$HOME/" GAME_DIR "/soundfonts", true);
SetValueForKey("Path", "$HOME/" GAME_DIR "/fm_banks", true);
@@ -63,31 +88,6 @@ index a04264dbe..55e66bc4c 100644
#endif
}
-diff --git a/src/posix/sdl/i_main.cpp b/src/posix/sdl/i_main.cpp
-index ed0e26450..baca003d7 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();
-
--
-2.26.0
+2.27.0