mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-24 05:44:16 +00:00
engine/client: fallback to defaults in touch_reloadconfig if config not exist
This commit is contained in:
parent
e68b19ed1a
commit
dcb3da53b0
@ -760,6 +760,8 @@ static void Touch_SetCommand_f( void )
|
|||||||
Con_Printf( S_USAGE "touch_setcommand <name> <command>\n" );
|
Con_Printf( S_USAGE "touch_setcommand <name> <command>\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void Touch_LoadDefaults_f( void );
|
||||||
|
|
||||||
static void Touch_ReloadConfig_f( void )
|
static void Touch_ReloadConfig_f( void )
|
||||||
{
|
{
|
||||||
touch.state = state_none;
|
touch.state = state_none;
|
||||||
@ -769,8 +771,15 @@ static void Touch_ReloadConfig_f( void )
|
|||||||
touch.selection->finger = -1;
|
touch.selection->finger = -1;
|
||||||
touch.edit = touch.selection = NULL;
|
touch.edit = touch.selection = NULL;
|
||||||
touch.resize_finger = touch.move_finger = touch.look_finger = touch.wheel_finger = -1;
|
touch.resize_finger = touch.move_finger = touch.look_finger = touch.wheel_finger = -1;
|
||||||
|
if( FS_FileExists( touch_config_file.string, true ) )
|
||||||
Cbuf_AddTextf( "exec %s\n", touch_config_file.string );
|
{
|
||||||
|
Cbuf_AddTextf( "exec \"%s\"\n", touch_config_file.string );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Touch_LoadDefaults_f();
|
||||||
|
touch.configchanged = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static touch_button_t *Touch_AddButton( touchbuttonlist_t *list,
|
static touch_button_t *Touch_AddButton( touchbuttonlist_t *list,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user