pcre: fork, fix sources
[kiss-trunc88.git] / lzdoom / patches / file-paths.patch
blob41acfe037ee622061b9e9f73befb8e54c9ae07f7
1 From 99e82d0644fee9a21e967b7b8708ff253e7528d5 Mon Sep 17 00:00:00 2001
2 From: Jan Cholasta <jan@cholasta.net>
3 Date: Tue, 25 Feb 2020 12:53:07 +0100
4 Subject: [PATCH] Fix file paths
6 ---
7 src/common/platform/posix/sdl/i_main.cpp | 14 +-------------
8 src/gameconfigfile.cpp | 10 ++--------
9 2 files changed, 3 insertions(+), 21 deletions(-)
11 diff --git a/src/common/platform/posix/sdl/i_main.cpp b/src/common/platform/posix/sdl/i_main.cpp
12 index a28b90f01..7299029fd 100644
13 --- a/src/posix/sdl/i_main.cpp
14 +++ b/src/posix/sdl/i_main.cpp
15 @@ -189,19 +189,7 @@
16 Args = new FArgs(argc, argv);
18 // Should we even be doing anything with progdir on Unix systems?
19 - char program[PATH_MAX];
20 - if (realpath (argv[0], program) == NULL)
21 - strcpy (program, argv[0]);
22 - char *slash = strrchr (program, '/');
23 - if (slash != NULL)
24 - {
25 - *(slash + 1) = '\0';
26 - progdir = program;
27 - }
28 - else
29 - {
30 - progdir = "./";
31 - }
32 + progdir = "/usr/share/lzdoom/";
34 I_StartupJoysticks();
36 diff --git a/src/gameconfigfile.cpp b/src/gameconfigfile.cpp
37 index 17898f3ae..7bfb63205 100644
38 --- a/src/gameconfigfile.cpp
39 +++ b/src/gameconfigfile.cpp
40 @@ -119,8 +119,6 @@ FGameConfigFile::FGameConfigFile ()
41 // Arch Linux likes them in /usr/share/doom
42 // Debian likes them in /usr/share/games/doom
43 // I assume other distributions don't do anything radically different
44 - SetValueForKey ("Path", "/usr/local/share/doom", true);
45 - SetValueForKey ("Path", "/usr/local/share/games/doom", true);
46 SetValueForKey ("Path", "/usr/share/doom", true);
47 SetValueForKey ("Path", "/usr/share/games/doom", true);
48 #endif
49 @@ -141,8 +139,6 @@ FGameConfigFile::FGameConfigFile ()
50 SetValueForKey ("Path", "$HOME/" GAME_DIR, true);
51 SetValueForKey ("Path", "$HOME/.local/share/games/doom", true);
52 SetValueForKey ("Path", SHARE_DIR, true);
53 - SetValueForKey ("Path", "/usr/local/share/doom", true);
54 - SetValueForKey ("Path", "/usr/local/share/games/doom", true);
55 SetValueForKey ("Path", "/usr/share/doom", true);
56 SetValueForKey ("Path", "/usr/share/games/doom", true);
57 #endif
58 @@ -170,8 +166,6 @@ FGameConfigFile::FGameConfigFile ()
59 SetValueForKey("Path", "$HOME/" GAME_DIR "/fm_banks", true);
60 - SetValueForKey("Path", "/usr/local/share/doom/soundfonts", true);
61 - SetValueForKey("Path", "/usr/local/share/doom/fm_banks", true);
62 - SetValueForKey("Path", "/usr/local/share/games/doom/soundfonts", true);
63 - SetValueForKey("Path", "/usr/local/share/games/doom/fm_banks", true);
64 + SetValueForKey("Path", "/usr/share/" GAMENAMELOWERCASE "/soundfonts", true);
65 + SetValueForKey("Path", "/usr/share/" GAMENAMELOWERCASE "/fm_banks", true);
66 SetValueForKey("Path", "/usr/share/doom/soundfonts", true);
67 SetValueForKey("Path", "/usr/share/doom/fm_banks", true);
68 SetValueForKey("Path", "/usr/share/games/doom/soundfonts", true);
69 --
70 2.34.1