Browse Source

engine: fix build

pull/2/head
Alibek Omarov 2 years ago
parent
commit
e44718d531
  1. 2
      engine/common/host.c
  2. 4
      engine/common/launcher.c
  3. 3
      engine/common/system.c
  4. 1
      engine/common/system.h

2
engine/common/host.c

@ -306,7 +306,7 @@ void Host_NewInstance( const char *name, const char *finalmsg ) @@ -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
}

4
engine/common/launcher.c

@ -47,7 +47,7 @@ static void Sys_ChangeGame( const char *progname ) @@ -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 ) @@ -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;
}

3
engine/common/system.c

@ -17,6 +17,7 @@ GNU General Public License for more details. @@ -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 @@ -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;

1
engine/common/system.h

@ -68,6 +68,7 @@ void Sys_PrintLog( const char *pMsg ); @@ -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

Loading…
Cancel
Save