mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: client: let loading custom menu dll with -menulib command line switch
This commit is contained in:
@@ -358,6 +358,7 @@ typedef struct host_parm_s
|
||||
int window_center_y;
|
||||
string gamedll;
|
||||
string clientlib;
|
||||
string menulib;
|
||||
} host_parm_t;
|
||||
|
||||
extern host_parm_t host;
|
||||
|
||||
@@ -328,6 +328,9 @@ void FS_Init( const char *basedir )
|
||||
|
||||
if( !Sys_GetParmFromCmdLine( "-clientlib", host.clientlib ))
|
||||
host.clientlib[0] = 0;
|
||||
|
||||
if( !Sys_GetParmFromCmdLine( "-menulib", host.menulib ))
|
||||
host.menulib[0] = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -177,6 +177,7 @@ static void Sys_PrintUsage( const char *exename )
|
||||
O("-dll <path> ", "override server DLL path")
|
||||
#if !XASH_DEDICATED
|
||||
O("-clientlib <path> ", "override client DLL path")
|
||||
O("-menulib <path> ", "override menu DLL path")
|
||||
O("-console ", "run engine with console enabled")
|
||||
O("-toconsole ", "run engine witn console open")
|
||||
O("-oldfont ", "enable unused Quake font in Half-Life")
|
||||
|
||||
@@ -228,7 +228,14 @@ void COM_GetCommonLibraryPath( ECommonLibraryType eLibType, char *out, size_t si
|
||||
switch( eLibType )
|
||||
{
|
||||
case LIBRARY_GAMEUI:
|
||||
COM_GenerateClientLibraryPath( "menu", out, size );
|
||||
if( COM_CheckStringEmpty( host.menulib ))
|
||||
{
|
||||
Q_strncpy( out, host.menulib, size );
|
||||
}
|
||||
else
|
||||
{
|
||||
COM_GenerateClientLibraryPath( "menu", out, size );
|
||||
}
|
||||
break;
|
||||
case LIBRARY_CLIENT:
|
||||
if( COM_CheckStringEmpty( host.clientlib ))
|
||||
|
||||
Reference in New Issue
Block a user