mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
filesystem: copy absolute path to library in FS_FindLibrary for compatibility
Extend fullPath for longer absolute paths.
This commit is contained in:
@@ -1363,8 +1363,13 @@ static qboolean FS_FindLibrary( const char *dllname, qboolean directpath, fs_dll
|
||||
|
||||
if( index >= 0 && !dllInfo->encrypted && search )
|
||||
{
|
||||
Q_snprintf( dllInfo->fullPath, sizeof( dllInfo->fullPath ),
|
||||
"%s%s", search->filename, dllInfo->shortPath );
|
||||
// gamedll might resolve it's own path using dladdr()
|
||||
// combine it with engine returned path to gamedir
|
||||
// it might lead to double gamedir like this
|
||||
// - valve/valve/dlls/hl.so
|
||||
// instead of expected
|
||||
// - valve/dlls/hl.so
|
||||
Q_snprintf( dllInfo->fullPath, sizeof( dllInfo->fullPath ), "%s/%s%s", fs_rootdir, search->filename, dllInfo->shortPath );
|
||||
dllInfo->custom_loader = false; // we can loading from disk and use normal debugging
|
||||
}
|
||||
else
|
||||
|
||||
@@ -31,7 +31,7 @@ extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
|
||||
#define FS_API_VERSION 2 // not stable yet!
|
||||
#define FS_API_VERSION 3 // not stable yet!
|
||||
#define FS_API_CREATEINTERFACE_TAG "XashFileSystem002" // follow FS_API_VERSION!!!
|
||||
#define FILESYSTEM_INTERFACE_VERSION "VFileSystem009" // never change this!
|
||||
|
||||
@@ -121,8 +121,8 @@ typedef enum
|
||||
|
||||
typedef struct fs_dllinfo_t
|
||||
{
|
||||
string fullPath;
|
||||
string shortPath;
|
||||
char fullPath[2048]; // absolute disk path
|
||||
string shortPath; // vfs path
|
||||
qboolean encrypted;
|
||||
qboolean custom_loader;
|
||||
} fs_dllinfo_t;
|
||||
|
||||
Reference in New Issue
Block a user