engine: fix build

This commit is contained in:
Alibek Omarov 2022-06-13 04:05:50 +03:00
parent e6a2c207de
commit e44718d531
4 changed files with 6 additions and 4 deletions

View File

@ -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
}

View File

@ -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;
}

View File

@ -17,6 +17,7 @@ GNU General Public License for more details.
#include "xash3d_mathlib.h"
#include "platform/platform.h"
#include <stdlib.h>
#include <errno.h>
#ifdef XASH_SDL
#include <SDL.h>
@ -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;

View File

@ -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