mirror of
https://github.com/w23/xash3d-fwgs
synced 2024-12-16 14:10:11 +01:00
engine: ensure that we loading same client library
This commit is contained in:
parent
e9e4a1296d
commit
5af6506d86
@ -3950,7 +3950,7 @@ qboolean CL_LoadProgs( const char *name )
|
||||
// NOTE: important stuff!
|
||||
// vgui must startup BEFORE loading client.dll to avoid get error ERROR_NOACESS
|
||||
// during LoadLibrary
|
||||
VGui_Startup( gameui.globals->scrWidth, gameui.globals->scrHeight );
|
||||
VGui_Startup( name, gameui.globals->scrWidth, gameui.globals->scrHeight );
|
||||
|
||||
clgame.hInstance = COM_LoadLibrary( name, false, false );
|
||||
if( !clgame.hInstance ) return false;
|
||||
|
@ -2980,7 +2980,11 @@ void CL_Init( void )
|
||||
// IN_TouchInit();
|
||||
Con_LoadHistory();
|
||||
|
||||
#ifdef XASH_INTERNAL_GAMELIBS
|
||||
if( !CL_LoadProgs( "client" ) )
|
||||
#else
|
||||
if( !CL_LoadProgs( va( "%s/%s", GI->dll_path, SI.clientlib)))
|
||||
#endif
|
||||
Host_Error( "can't initialize %s: %s\n", SI.clientlib, COM_GetLibraryError() );
|
||||
|
||||
cls.initialized = true;
|
||||
|
@ -731,7 +731,7 @@ void SCR_VidInit( void )
|
||||
gameui.globals->scrHeight = refState.height;
|
||||
}
|
||||
|
||||
VGui_Startup( refState.width, refState.height );
|
||||
VGui_Startup( NULL, refState.width, refState.height ); // initialized already, so pass NULL
|
||||
|
||||
CL_ClearSpriteTextures(); // now all hud sprites are invalid
|
||||
|
||||
|
@ -218,7 +218,7 @@ VGui_Startup
|
||||
Load vgui_support library and call VGui_Startup
|
||||
================
|
||||
*/
|
||||
void VGui_Startup( int width, int height )
|
||||
void VGui_Startup( const char *clientlib, int width, int height )
|
||||
{
|
||||
static qboolean failed = false;
|
||||
|
||||
@ -238,7 +238,7 @@ void VGui_Startup( int width, int height )
|
||||
VGui_FillAPIFromRef( &vgui, &ref.dllFuncs );
|
||||
|
||||
#ifdef XASH_INTERNAL_GAMELIBS
|
||||
s_pVGuiSupport = COM_LoadLibrary( "client", false, false );
|
||||
s_pVGuiSupport = COM_LoadLibrary( clientlib, false, false );
|
||||
|
||||
if( s_pVGuiSupport )
|
||||
{
|
||||
|
@ -25,7 +25,7 @@ extern "C" {
|
||||
//
|
||||
// vgui_draw.c
|
||||
//
|
||||
void VGui_Startup( int width, int height );
|
||||
void VGui_Startup( const char *clientlib, int width, int height );
|
||||
void VGui_Shutdown( void );
|
||||
void VGui_Paint();
|
||||
void VGui_RunFrame();
|
||||
|
@ -1544,8 +1544,8 @@ void FS_LoadGameInfo( const char *rootfolder )
|
||||
}
|
||||
if( !Sys_GetParmFromCmdLine( "-clientlib", SI.clientlib ) )
|
||||
{
|
||||
#ifdef __ANDROID__
|
||||
Q_strncpy( SI.clientlib, CLIENTDLL, sizeof( SI.clientlib ) );
|
||||
#ifdef XASH_INTERNAL_GAMELIBS
|
||||
Q_strncpy( SI.clientlib, "client", sizeof( SI.clientlib ) );
|
||||
#else
|
||||
Q_strncpy( SI.clientlib, GI->client_lib, sizeof( SI.clientlib ) );
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user