From 3c4eec62aed833c79ed46e4f2e9c8ab116ec8d94 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 1 Aug 2022 13:25:51 +0300 Subject: [PATCH] engine: let engine find the filesystem library, if it wasn't loaded yet --- engine/common/lib_common.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/engine/common/lib_common.c b/engine/common/lib_common.c index 5b86df77..cdd3f8b6 100644 --- a/engine/common/lib_common.c +++ b/engine/common/lib_common.c @@ -91,9 +91,16 @@ dll_user_t *FS_FindLibrary( const char *dllname, qboolean directpath ) dll_user_t *p; fs_dllinfo_t dllInfo; - // no fs loaded, can't search + // no fs loaded yet, but let engine find fs if( !g_fsapi.FindLibrary ) - return NULL; + { + p = Mem_Calloc( host.mempool, sizeof( dll_user_t )); + Q_strncpy( p->shortPath, dllname, sizeof( p->shortPath )); + Q_strncpy( p->fullPath, dllname, sizeof( p->fullPath )); + Q_strncpy( p->dllName, dllname, sizeof( p->dllName )); + + return p; + } // fs can't find library if( !g_fsapi.FindLibrary( dllname, directpath, &dllInfo ))