]> git.pld-linux.org Git - packages/quake3.git/blob - quake3-QUAKELIBDIR.patch
updated snap to 20190729
[packages/quake3.git] / quake3-QUAKELIBDIR.patch
1 diff -urN quake3.orig/code/sys/sys_main.c quake3/code/sys/sys_main.c
2 --- quake3.orig/code/sys/sys_main.c     2019-07-29 18:40:49.424888973 +0200
3 +++ quake3/code/sys/sys_main.c  2019-07-29 18:51:00.376127397 +0200
4 @@ -500,7 +500,7 @@
5  Sys_LoadDll
6  
7  First try to load library name from system library path,
8 -from executable path, then fs_basepath.
9 +from executable path, QUAKELIBDIR, then fs_basepath.
10  =================
11  */
12  
13 @@ -542,6 +542,25 @@
14                         Com_Printf("Skipping trying to load \"%s\" from \"%s\", file name is too long.\n", name, topDir);
15                 }
16  
17 +#if defined(QUAKELIBDIR)
18 +               if(!dllhandle)
19 +               {
20 +                       char libPath[MAX_OSPATH];
21 +                       int len;
22 +
23 +                       len = Com_sprintf(libPath, sizeof(libPath), "%s%c%s", QUAKELIBDIR, PATH_SEP, name);
24 +                       if(len < sizeof(libPath))
25 +                       {
26 +                               Com_Printf("Trying to load \"%s\" from \"%s\"...\n", name, QUAKELIBDIR);
27 +                               dllhandle = Sys_LoadLibrary(libPath);
28 +                       }
29 +                       else
30 +                       {
31 +                               Com_Printf("Skipping trying to load \"%s\" from \"%s\", file name is too long.\n", name, QUAKELIBDIR);
32 +                       }
33 +               }
34 +#endif
35 +
36                 if(!dllhandle)
37                 {
38                         const char *basePath = Cvar_VariableString("fs_basepath");
This page took 0.035477 seconds and 3 git commands to generate.