diff --git a/engine/common/common.h b/engine/common/common.h index 809b8357..f111cbae 100644 --- a/engine/common/common.h +++ b/engine/common/common.h @@ -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; diff --git a/engine/common/filesystem_engine.c b/engine/common/filesystem_engine.c index ef776199..83d55484 100644 --- a/engine/common/filesystem_engine.c +++ b/engine/common/filesystem_engine.c @@ -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; } /* diff --git a/engine/common/host.c b/engine/common/host.c index c2f7e453..f50cfa21 100644 --- a/engine/common/host.c +++ b/engine/common/host.c @@ -177,6 +177,7 @@ static void Sys_PrintUsage( const char *exename ) O("-dll ", "override server DLL path") #if !XASH_DEDICATED O("-clientlib ", "override client DLL path") + O("-menulib ", "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") diff --git a/engine/common/lib_common.c b/engine/common/lib_common.c index 7c4fb8aa..12f5b03c 100644 --- a/engine/common/lib_common.c +++ b/engine/common/lib_common.c @@ -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 ))