diff options
Diffstat (limited to 'games/ioquake3/files/patch-code-sys-sys_main.c')
-rw-r--r-- | games/ioquake3/files/patch-code-sys-sys_main.c | 65 |
1 files changed, 24 insertions, 41 deletions
diff --git a/games/ioquake3/files/patch-code-sys-sys_main.c b/games/ioquake3/files/patch-code-sys-sys_main.c index cdec5a52c318..0a936fdf9f2c 100644 --- a/games/ioquake3/files/patch-code-sys-sys_main.c +++ b/games/ioquake3/files/patch-code-sys-sys_main.c @@ -1,22 +1,17 @@ ---- code/sys/sys_main.c.orig 2009-08-30 22:32:59.000000000 +0200 -+++ code/sys/sys_main.c 2009-08-30 23:21:12.000000000 +0200 -@@ -49,6 +49,9 @@ +--- code/sys/sys_main.c.orig 2009-03-02 23:26:36.000000000 +0100 ++++ code/sys/sys_main.c 2009-12-08 11:31:12.000000000 +0100 +@@ -49,6 +49,7 @@ static char binaryPath[ MAX_OSPATH ] = { 0 }; static char installPath[ MAX_OSPATH ] = { 0 }; -+#ifdef __FreeBSD__ +static char libPath[ MAX_OSPATH ] = { 0 }; -+#endif /* ================= -@@ -93,6 +96,31 @@ - return Sys_Cwd(); - } +@@ -95,6 +96,30 @@ -+#ifdef __FreeBSD__ -+/* -+================= + /* + ================= +Sys_SetDefaultLibPath +================= +*/ @@ -37,75 +32,63 @@ + else + return Sys_Cwd(); +} -+#endif + - /* - ================= ++ ++/* ++================= Sys_DefaultAppPath -@@ -384,6 +412,7 @@ + ================= + */ +@@ -384,6 +409,7 @@ #1 look down current path #2 look in fs_homepath #3 look in fs_basepath -+#4 look in fs_libpath under FreeBSD ++#4 look in fs_libpath ================= */ void *Sys_LoadDll( const char *name, char *fqpath , -@@ -394,6 +423,9 @@ +@@ -394,6 +420,7 @@ void (*dllEntry)( intptr_t (*syscallptr)(intptr_t, ...) ); char fname[MAX_OSPATH]; char *basepath; -+ #ifdef __FreeBSD__ + char *libpath; -+ #endif char *homepath; char *pwdpath; char *gamedir; -@@ -405,6 +437,9 @@ +@@ -405,6 +432,7 @@ // TODO: use fs_searchpaths from files.c pwdpath = Sys_Cwd(); basepath = Cvar_VariableString( "fs_basepath" ); -+ #ifdef __FreeBSD__ + libpath = Cvar_VariableString( "fs_libpath" ); -+ #endif homepath = Cvar_VariableString( "fs_homepath" ); gamedir = Cvar_VariableString( "fs_game" ); -@@ -416,6 +451,11 @@ - if(!libHandle && basepath) - libHandle = Sys_TryLibraryLoad(basepath, gamedir, fname, fqpath); +@@ -413,6 +441,9 @@ + if(!libHandle && homepath) + libHandle = Sys_TryLibraryLoad(homepath, gamedir, fname, fqpath); -+ #ifdef __FreeBSD__ + if(!libHandle && libpath) + libHandle = Sys_TryLibraryLoad(libpath, gamedir, fname, fqpath); -+ #endif + - if(!libHandle) { - Com_Printf ( "Sys_LoadDll(%s) failed to load library\n", name ); - return NULL; -@@ -469,6 +509,16 @@ + if(!libHandle && basepath) + libHandle = Sys_TryLibraryLoad(basepath, gamedir, fname, fqpath); + +@@ -469,6 +500,10 @@ # endif #endif -+#ifdef __FreeBSD__ +#ifndef DEFAULT_LIBDIR -+# ifdef MACOS_X -+# define DEFAULT_LIBDIR Sys_StripAppBundle(Sys_BinaryPath()) -+# else -+# define DEFAULT_LIBDIR Sys_BinaryPath() -+# endif -+#endif ++# define DEFAULT_LIBDIR DEFAULT_BASEDIR +#endif + /* ================= Sys_SigHandler -@@ -540,6 +590,9 @@ +@@ -540,6 +575,7 @@ Sys_ParseArgs( argc, argv ); Sys_SetBinaryPath( Sys_Dirname( argv[ 0 ] ) ); Sys_SetDefaultInstallPath( DEFAULT_BASEDIR ); -+ #ifdef __FreeBSD__ + Sys_SetDefaultLibPath( DEFAULT_LIBDIR ); -+ #endif // Concatenate the command line for passing to Com_Init for( i = 1; i < argc; i++ ) |