Skip to content

Commit

Permalink
engine: client: disable server DLL probe for GameUI, check it's exist…
Browse files Browse the repository at this point in the history
…ence instead
  • Loading branch information
a1batross committed Oct 28, 2023
1 parent 7f9025e commit a2c9ac5
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions engine/client/cl_gameui.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

This comment has been minimized.

Copy link
@Velaron

Velaron Oct 31, 2023

Member

should be ifdef, fails to build with clang

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
}

/*
Expand Down

0 comments on commit a2c9ac5

Please sign in to comment.