From e44718d531142da34a9ee5b52db76efcc8179a77 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 13 Jun 2022 04:05:50 +0300 Subject: [PATCH] engine: fix build --- engine/common/host.c | 2 +- engine/common/launcher.c | 4 ++-- engine/common/system.c | 3 ++- engine/common/system.h | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/engine/common/host.c b/engine/common/host.c index fcac92dd..fee751ce 100644 --- a/engine/common/host.c +++ b/engine/common/host.c @@ -306,7 +306,7 @@ void Host_NewInstance( const char *name, const char *finalmsg ) host.change_game = true; Q_strncpy( host.finalmsg, finalmsg, sizeof( host.finalmsg )); - if( !Platform_ChangeGame( name )) + if( !Sys_NewInstance( name )) pChangeGame( name ); // call from hl.exe } diff --git a/engine/common/launcher.c b/engine/common/launcher.c index d1ae3706..9410024c 100644 --- a/engine/common/launcher.c +++ b/engine/common/launcher.c @@ -47,7 +47,7 @@ static void Sys_ChangeGame( const char *progname ) // if platform supports execv() function Q_strncpy( szGameDir, progname, sizeof( szGameDir ) - 1 ); Host_Shutdown( ); - exit( Host_Main( szArgc, szArgv, szGameDir, 1, &Launcher_ChangeGame ) ); + exit( Host_Main( szArgc, szArgv, szGameDir, 1, &Sys_ChangeGame ) ); } _inline int Sys_Start( void ) @@ -81,7 +81,7 @@ _inline int Sys_Start( void ) } #endif - ret = Host_Main( szArgc, szArgv, game, 0, Launcher_ChangeGame ); + ret = Host_Main( szArgc, szArgv, game, 0, Sys_ChangeGame ); return ret; } diff --git a/engine/common/system.c b/engine/common/system.c index f154f7ee..bfff6c66 100644 --- a/engine/common/system.c +++ b/engine/common/system.c @@ -17,6 +17,7 @@ GNU General Public License for more details. #include "xash3d_mathlib.h" #include "platform/platform.h" #include +#include #ifdef XASH_SDL #include @@ -556,7 +557,7 @@ but since engine will be unloaded during this call it explicitly doesn't use internal allocation or string copy utils ================== */ -qboolean Sys_ChangeGame( const char *gamedir ) +qboolean Sys_NewInstance( const char *gamedir ) { int i = 0; qboolean replacedArg = false; diff --git a/engine/common/system.h b/engine/common/system.h index 48fb1807..6a186602 100644 --- a/engine/common/system.h +++ b/engine/common/system.h @@ -68,6 +68,7 @@ void Sys_PrintLog( const char *pMsg ); void Sys_InitLog( void ); void Sys_CloseLog( void ); void Sys_Quit( void ) NORETURN; +qboolean Sys_NewInstance( const char *gamedir ); // // sys_con.c