nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c
2index 10c0747bf..861f00728 100644
3--- a/src/sdl/i_system.c
4+++ b/src/sdl/i_system.c
5@@ -145,13 +145,7 @@ int TimeFunction(int requested_frequency);
6
7 // Locations for searching the srb2.pk3
8 #if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON)
9-#define DEFAULTWADLOCATION1 "/usr/local/share/games/SRB2"
10-#define DEFAULTWADLOCATION2 "/usr/local/games/SRB2"
11-#define DEFAULTWADLOCATION3 "/usr/share/games/SRB2"
12-#define DEFAULTWADLOCATION4 "/usr/games/SRB2"
13-#define DEFAULTSEARCHPATH1 "/usr/local/games"
14-#define DEFAULTSEARCHPATH2 "/usr/games"
15-#define DEFAULTSEARCHPATH3 "/usr/local"
16+#define DEFAULTWADLOCATION1 "@wadlocation@"
17 #elif defined (_WIN32)
18 #define DEFAULTWADLOCATION1 "c:\\games\\srb2"
19 #define DEFAULTWADLOCATION2 "\\games\\srb2"
20@@ -2812,34 +2806,6 @@ static const char *locateWad(void)
21 if (((envstr = I_GetEnv("SRB2WADDIR")) != NULL) && isWadPathOk(envstr))
22 return envstr;
23
24-#ifndef NOCWD
25- I_OutputMsg(",.");
26- // examine current dir
27- strcpy(returnWadPath, ".");
28- if (isWadPathOk(returnWadPath))
29- return NULL;
30-#endif
31-
32-
33-#ifdef CMAKECONFIG
34-#ifndef NDEBUG
35- I_OutputMsg(","CMAKE_ASSETS_DIR);
36- strcpy(returnWadPath, CMAKE_ASSETS_DIR);
37- if (isWadPathOk(returnWadPath))
38- {
39- return returnWadPath;
40- }
41-#endif
42-#endif
43-
44-#ifdef __APPLE__
45- OSX_GetResourcesPath(returnWadPath);
46- I_OutputMsg(",%s", returnWadPath);
47- if (isWadPathOk(returnWadPath))
48- {
49- return returnWadPath;
50- }
51-#endif
52
53 // examine default dirs
54 #ifdef DEFAULTWADLOCATION1
55@@ -2884,16 +2850,7 @@ static const char *locateWad(void)
56 if (isWadPathOk(returnWadPath))
57 return returnWadPath;
58 #endif
59-#ifndef NOHOME
60- // find in $HOME
61- I_OutputMsg(",HOME");
62- if ((envstr = I_GetEnv("HOME")) != NULL)
63- {
64- WadPath = searchWad(envstr);
65- if (WadPath)
66- return WadPath;
67- }
68-#endif
69+
70 #ifdef DEFAULTSEARCHPATH1
71 // find in /usr/local
72 I_OutputMsg(", in:"DEFAULTSEARCHPATH1);