mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
game_launch: Add a --disable-menu-changegame build option
This option is useful when xash3d is launched externally by a script that performs additional setup.
This commit is contained in:
parent
c95e847890
commit
11194f339d
@ -129,9 +129,16 @@ static void Sys_ChangeGame( const char *progname )
|
|||||||
_inline int Sys_Start( void )
|
_inline int Sys_Start( void )
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
pfnChangeGame changeGame = NULL;
|
||||||
|
|
||||||
Sys_LoadEngine();
|
Sys_LoadEngine();
|
||||||
ret = Xash_Main( szArgc, szArgv, GAME_PATH, 0, Xash_Shutdown ? Sys_ChangeGame : NULL );
|
|
||||||
|
#ifndef XASH_DISABLE_MENU_CHANGEGAME
|
||||||
|
if( Xash_Shutdown )
|
||||||
|
changeGame = Sys_ChangeGame;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ret = Xash_Main( szArgc, szArgv, GAME_PATH, 0, changeGame );
|
||||||
Sys_UnloadEngine();
|
Sys_UnloadEngine();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -9,12 +9,17 @@ import sys
|
|||||||
top = '.'
|
top = '.'
|
||||||
|
|
||||||
def options(opt):
|
def options(opt):
|
||||||
return
|
grp = opt.add_option_group('Game launcher options')
|
||||||
|
|
||||||
|
grp.add_option('--disable-menu-changegame', action = 'store_true', dest = 'DISABLE_MENU_CHANGEGAME', default = False,
|
||||||
|
help = 'disable changing the game from the menu [default: %default]')
|
||||||
|
|
||||||
def configure(conf):
|
def configure(conf):
|
||||||
if conf.env.DEST_OS == 'win32':
|
if conf.env.DEST_OS == 'win32':
|
||||||
conf.load('winres')
|
conf.load('winres')
|
||||||
|
|
||||||
|
conf.define_cond('XASH_DISABLE_MENU_CHANGEGAME', conf.options.DISABLE_MENU_CHANGEGAME)
|
||||||
|
|
||||||
def build(bld):
|
def build(bld):
|
||||||
source = ['game.cpp']
|
source = ['game.cpp']
|
||||||
includes = '. ../common ../public'
|
includes = '. ../common ../public'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user