From a2c9ac5b1f6dd75f46691d4530b785ef882e6534 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 23 Sep 2023 04:07:24 +0300 Subject: [PATCH] engine: client: disable server DLL probe for GameUI, check it's existence instead --- engine/client/cl_gameui.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/engine/client/cl_gameui.c b/engine/client/cl_gameui.c index 068a47d0..ede3c36d 100644 --- a/engine/client/cl_gameui.c +++ b/engine/client/cl_gameui.c @@ -982,28 +982,21 @@ pfnCheckGameDll */ int GAME_EXPORT pfnCheckGameDll( void ) { - string dllpath; - void *hInst; - -#if TARGET_OS_IPHONE - // loading server library drains too many ram - // so 512MB iPod Touch cannot even connect to - // to servers in cstrike +#if XASH_INTERNAL_GAMELIBS return true; -#endif +#else + string dllpath; if( svgame.hInstance ) return true; COM_GetCommonLibraryPath( LIBRARY_SERVER, dllpath, sizeof( dllpath )); - if(( hInst = COM_LoadLibrary( dllpath, true, false )) != NULL ) - { - COM_FreeLibrary( hInst ); // don't increase linker's reference counter + if( FS_FileExists( dllpath, false )) return true; - } - Con_Reportf( S_WARN "Could not load server library: %s\n", COM_GetLibraryError() ); + return false; +#endif } /*