From d6dfeaeba7a8c2a436a8a9cad30335fef0f27145 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 6 Aug 2022 20:15:18 +0300 Subject: [PATCH] engine: fix searching filesystem_stdio on mobile platforms --- engine/common/common.h | 3 +-- engine/common/filesystem_engine.c | 9 ++++++++- engine/common/host.c | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/engine/common/common.h b/engine/common/common.h index b954dbd3..f70337e2 100644 --- a/engine/common/common.h +++ b/engine/common/common.h @@ -398,8 +398,7 @@ typedef void (*xcommand_t)( void ); // // filesystem_engine.c // -#define FILESYSTEM_STDIO_DLL "filesystem_stdio." OS_LIB_EXT -qboolean FS_LoadProgs( const char *name ); +qboolean FS_LoadProgs( void ); void FS_Init( void ); void FS_Shutdown( void ); diff --git a/engine/common/filesystem_engine.c b/engine/common/filesystem_engine.c index 42754134..6d3ff03e 100644 --- a/engine/common/filesystem_engine.c +++ b/engine/common/filesystem_engine.c @@ -56,8 +56,15 @@ static void FS_UnloadProgs( void ) fs_hInstance = 0; } -qboolean FS_LoadProgs( const char *name ) +#ifdef XASH_INTERNAL_GAMELIBS +#define FILESYSTEM_STDIO_DLL "filesystem_stdio" +#else +#define FILESYSTEM_STDIO_DLL "filesystem_stdio." OS_LIB_EXT +#endif + +qboolean FS_LoadProgs( void ) { + const char *name = FILESYSTEM_STDIO_DLL; FSAPI GetFSAPI; fs_hInstance = COM_LoadLibrary( name, false, true ); diff --git a/engine/common/host.c b/engine/common/host.c index 3f89d176..f259cdca 100644 --- a/engine/common/host.c +++ b/engine/common/host.c @@ -1033,7 +1033,7 @@ void Host_InitCommon( int argc, char **argv, const char *progname, qboolean bCha return; } - FS_LoadProgs( FILESYSTEM_STDIO_DLL ); + FS_LoadProgs(); if( FS_SetCurrentDirectory( host.rootdir ) != 0 ) Con_Reportf( "%s is working directory now\n", host.rootdir );