mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-12-23 17:25:24 +01:00
Fix server library sanity checking
This commit is contained in:
parent
32aa9a9f54
commit
cec7bf8488
@ -19,6 +19,7 @@ GNU General Public License for more details.
|
|||||||
#include "gl_local.h"
|
#include "gl_local.h"
|
||||||
#include "library.h"
|
#include "library.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
#include "server.h" // !!svgame.hInstance
|
||||||
|
|
||||||
static MENUAPI GetMenuAPI;
|
static MENUAPI GetMenuAPI;
|
||||||
static ADDTOUCHBUTTONTOLIST pfnAddTouchButtonToList;
|
static ADDTOUCHBUTTONTOLIST pfnAddTouchButtonToList;
|
||||||
@ -870,13 +871,23 @@ int pfnCheckGameDll( void )
|
|||||||
{
|
{
|
||||||
void *hInst;
|
void *hInst;
|
||||||
|
|
||||||
if( SV_Initialized( )) return true;
|
#if TARGET_OS_IPHONE
|
||||||
|
// loading server library drains too many ram
|
||||||
|
// so 512MB iPod Touch cannot even connect to
|
||||||
|
// to servers in cstrike
|
||||||
|
return true;
|
||||||
|
#endif
|
||||||
|
|
||||||
if(( hInst = COM_LoadLibrary( GI->game_dll, true, false )) != NULL )
|
if( svgame.hInstance )
|
||||||
|
return true;
|
||||||
|
|
||||||
|
COM_ResetLibraryError();
|
||||||
|
if(( hInst = COM_LoadLibrary( SI.gamedll, true, false )) != NULL )
|
||||||
{
|
{
|
||||||
COM_FreeLibrary( hInst );
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
MsgDev( D_WARN, "Could not load server library:\n%s", COM_GetLibraryError() );
|
||||||
|
COM_ResetLibraryError();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user