]> git.pld-linux.org Git - packages/doomlegacy.git/blob - doomlegacy-paths.patch
- removed two lines with define
[packages/doomlegacy.git] / doomlegacy-paths.patch
1 --- doomlegacy-1.32/doomlegacy/linux_x/i_video_xshm.c.orig      Fri May 11 14:54:59 2001
2 +++ doomlegacy-1.32/doomlegacy/linux_x/i_video_xshm.c   Sat Jun 30 10:55:58 2001
3 @@ -1896,7 +1896,7 @@
4          
5         rendermode = render_opengl;
6         //dlptr = dlopen("./r_opengl.so",RTLD_LAZY);
7 -       dlptr = dlopen("./r_opengl.so",RTLD_NOW | RTLD_GLOBAL);
8 +       dlptr = dlopen("/usr/X11R6/lib/doomlegacy/r_opengl.so",RTLD_NOW | RTLD_GLOBAL);
9         if(!dlptr) {
10            fprintf(stderr,"Error opening r_opengl.so!\n%s\n",dlerror());
11            rendermode = render_soft;
12 --- doomlegacy-1.32/doomlegacy/d_main.c.orig    Fri May 11 14:33:54 2001
13 +++ doomlegacy-1.32/doomlegacy/d_main.c Sat Jun 30 10:54:48 2001
14 @@ -979,15 +979,7 @@
15      // change to the directory where 'doom3.wad' is found
16     I_LocateWad();
17  #endif
18 -    doomwaddir = getenv("DOOMWADDIR");
19 -    if (!doomwaddir)
20 -    {
21 -        // get the current directory (possible problem on NT with "." as current dir)
22 -        if ( getcwd(pathtemp, _MAX_PATH) != NULL )
23 -            doomwaddir = pathtemp;
24 -        else
25 -            doomwaddir = ".";
26 -    }
27 +    doomwaddir = getenv("DOOMWADDIR") ? getenv("DOOMWADDIR") : "/usr/X11R6/share/doomlegacy";
28          
29  #ifdef __MACOS__
30          // cwd is always "/" when app is dbl-clicked
31 --- doomlegacy-1.32/doomlegacy/linux_x/i_system.c.orig  Fri May 11 14:54:58 2001
32 +++ doomlegacy-1.32/doomlegacy/linux_x/i_system.c       Wed Jul 18 15:33:51 2001
33 @@ -119,10 +119,10 @@
34  extern int             eventtail;
35  
36  // Locations for searching the doom3.wad
37 -#define DEFAULTWADLOCATION1 "/usr/local/games/legacy"
38 -#define DEFAULTWADLOCATION2 "/usr/games/legacy"
39 -#define DEFAULTSEARCHPATH1 "/usr/local"
40 -#define DEFAULTSEARCHPATH2 "/usr/games"
41 +#define DEFAULTWADLOCATION1 "/usr/X11R6/share/doomlegacy"
42 +#define DEFAULTWADLOCATION2 "/usr/share/games/doomlegacy"
43 +#define DEFAULTSEARCHPATH1 "/usr/share/games"
44 +#define DEFAULTSEARCHPATH2 "/usr/X11R6/share"
45  #define WADKEYWORD "doom3.wad"
46  
47  // holds wad path
48 --- doomlegacy-1.32/doomlegacy/linux_x/musserv/musserver.c.orig Fri May 11 14:55:26 2001
49 +++ doomlegacy-1.32/doomlegacy/linux_x/musserv/musserver.c      Wed Jul 18 15:35:53 2001
50 @@ -122,9 +122,7 @@
51      ppid = getpid();
52      if (verbose > 1) 
53         printf("pid %d %s\n", ppid, pproc);
54 -    waddir = getenv("DOOMWADDIR");
55 -    if (waddir == NULL)
56 -       waddir = ".";
57 +    waddir = getenv("DOOMWADDIR") ? getenv("DOOMWADDIR") : "/usr/X11R6/share/doomlegacy";
58  
59      while ((x = getopt(argc, argv, "acd:fhi:lmt:u:Vv")) != -1)
60         switch (x)
61 --- doomlegacy-1.32/doomlegacy/linux_x/musserv/readwad.c.orig   Fri May 11 14:55:27 2001
62 +++ doomlegacy-1.32/doomlegacy/linux_x/musserv/readwad.c        Wed Jul 18 15:37:09 2001
63 @@ -213,7 +213,7 @@
64      FILE *fp;
65  
66      if (!(waddir = getenv("DOOMWADDIR")))
67 -        waddir = ".";
68 +        waddir = "/usr/X11R6/share/doomlegacy";
69  
70      wadfilename = malloc(2 + strlen(s) + strlen(waddir));
71      if (*s != '/')
72 --- doomlegacy-1.32/doomlegacy/linux_x/searchp.c.orig   Fri May 11 14:54:59 2001
73 +++ doomlegacy-1.32/doomlegacy/linux_x/searchp.c        Wed Jul 18 15:46:11 2001
74 @@ -23,6 +23,11 @@
75         struct stat     s;
76         char            pb[2048];
77  
78 +       strcpy(b,"/usr/X11R6/lib/doomlegacy/");
79 +       strcat(b,file);
80 +       if (stat(b, &s) == 0) {
81 +               return(b);
82 +       }
83         /* get PATH, if not set just return filename, might be in cwd */
84          /* added "./" for current path 19990416 by Kin */
85         if ((path = getenv("PATH")) == NULL) {
This page took 0.033595 seconds and 3 git commands to generate.