]>
Commit | Line | Data |
---|---|---|
24b824db | 1 | --- doomlegacy_src/linux_x/musserv/musserver.c.orig Sat Feb 22 20:51:24 2003 |
2 | +++ doomlegacy_src/linux_x/musserv/musserver.c Sat Feb 22 20:52:15 2003 | |
3 | @@ -122,9 +122,7 @@ | |
4 | ppid = getpid(); | |
5 | if (verbose > 1) | |
6 | printf("pid %d %s\n", ppid, pproc); | |
7 | - waddir = getenv("DOOMWADDIR"); | |
8 | - if (waddir == NULL) | |
9 | - waddir = "."; | |
10 | + waddir = getenv("DOOMWADDIR") ? getenv("DOOMWADDIR") : "/usr/share/doomlegacy"; | |
11 | ||
12 | while ((x = getopt(argc, argv, "acd:fhi:lmt:u:Vv")) != -1) | |
13 | switch (x) | |
14 | --- doomlegacy_src/linux_x/musserv/readwad.c.orig Sat Feb 22 20:52:25 2003 | |
15 | +++ doomlegacy_src/linux_x/musserv/readwad.c Sat Feb 22 20:53:03 2003 | |
16 | @@ -213,7 +213,7 @@ | |
17 | FILE *fp; | |
18 | ||
19 | if (!(waddir = getenv("DOOMWADDIR"))) | |
20 | - waddir = "."; | |
21 | + waddir = "/usr/share/doomlegacy"; | |
22 | ||
23 | wadfilename = malloc(2 + strlen(s) + strlen(waddir)); | |
24 | if (*s != '/') | |
25 | --- doomlegacy_src/linux_x/i_video_xshm.c.orig Sat Feb 22 20:45:02 2003 | |
26 | +++ doomlegacy_src/linux_x/i_video_xshm.c Sat Feb 22 20:46:49 2003 | |
27 | @@ -1984,7 +1984,7 @@ | |
28 | rendermode = render_opengl; | |
29 | ||
30 | // try to open library in CWD | |
31 | - dlptr = dlopen("./r_opengl.so",RTLD_NOW | RTLD_GLOBAL); | |
32 | + dlptr = dlopen("/usr/lib/doomlegacy/r_opengl.so",RTLD_NOW | RTLD_GLOBAL); | |
33 | ||
34 | if(!dlptr) { | |
35 | // try to open in LIBPATH | |
36 | --- doomlegacy_src/linux_x/i_system.c.orig Sat Feb 22 20:48:37 2003 | |
37 | +++ doomlegacy_src/linux_x/i_system.c Sat Feb 22 20:50:55 2003 | |
38 | @@ -141,9 +141,9 @@ | |
39 | extern int eventtail; | |
40 | ||
41 | // Locations for searching the legacy.dat | |
42 | -#define DEFAULTWADLOCATION1 "/usr/local/games/legacy" | |
43 | -#define DEFAULTWADLOCATION2 "/usr/games/legacy" | |
44 | -#define DEFAULTSEARCHPATH1 "/usr/local" | |
45 | +#define DEFAULTWADLOCATION1 "/usr/share/doomlegacy" | |
46 | +#define DEFAULTWADLOCATION2 "/usr/share/games/doomlegacy" | |
47 | +#define DEFAULTSEARCHPATH1 "/usr/share/games/" | |
48 | #define DEFAULTSEARCHPATH2 "/usr/games" | |
49 | #define WADKEYWORD "legacy.dat" | |
50 | ||
51 | --- doomlegacy_src/linux_x/searchp.c.orig Sat Feb 22 20:53:41 2003 | |
52 | +++ doomlegacy_src/linux_x/searchp.c Sat Feb 22 20:54:22 2003 | |
53 | @@ -22,6 +22,12 @@ | |
54 | static char b[2048]; | |
55 | struct stat s; | |
56 | char pb[2048]; | |
57 | + | |
58 | + strcpy(b,"/usr/X11R6/lib/doomlegacy_src/"); | |
59 | + strcat(b,file); | |
60 | + if (stat(b, &s) == 0) { | |
61 | + return(b); | |
62 | + } | |
63 | ||
64 | /* get PATH, if not set just return filename, might be in cwd */ | |
65 | /* added "./" for current path 19990416 by Kin */ | |
66 | --- doomlegacy_src/d_main.c.orig Sat Feb 22 20:47:20 2003 | |
67 | +++ doomlegacy_src/d_main.c Sat Feb 22 20:48:10 2003 | |
68 | @@ -1022,16 +1022,8 @@ | |
69 | // change to the directory where 'legacy.dat' is found | |
70 | I_LocateWad(); | |
71 | #endif | |
72 | - doomwaddir = getenv("DOOMWADDIR"); | |
73 | - if (!doomwaddir) | |
74 | - { | |
75 | - // get the current directory (possible problem on NT with "." as current dir) | |
76 | - if ( getcwd(pathtemp, _MAX_PATH) != NULL ) | |
77 | - doomwaddir = pathtemp; | |
78 | - else | |
79 | - doomwaddir = "."; | |
80 | - } | |
81 | - | |
82 | + doomwaddir = getenv("DOOMWADDIR") ? getenv("DOOMWADDIR") : "/usr/share/doomlegacy"; | |
83 | + | |
84 | #ifdef __MACOS__ | |
85 | // cwd is always "/" when app is dbl-clicked | |
86 | if (!stricmp(doomwaddir,"/")) |