a couple more minor startup tweaks

This commit is contained in:
nhmall
2026-04-08 10:32:29 -04:00
parent 0085feb56a
commit f8fbd9848e
2 changed files with 9 additions and 4 deletions

View File

@@ -110,7 +110,8 @@ staticfn void parse_conf_buf(struct _cnf_parser_state *parser,
boolean (*proc)(char *arg));
/* next one is in extern.h; why here too? */
boolean parse_conf_str(const char *str, boolean (*proc)(char *arg));
static boolean ignore_errors_on_unmatched = FALSE;
static boolean ignore_errors_on_unmatched = FALSE,
ignore_statement_errors = FALSE;
#ifdef SFCTOOL
#ifdef wait_synch
@@ -1409,7 +1410,8 @@ parse_config_line(char *origbuf)
/* find the '=' or ':' */
bufp = find_optparam(buf);
if (!bufp) {
config_error_add("Not a config statement, missing '='");
if (!ignore_statement_errors)
config_error_add("Not a config statement, missing '='");
return FALSE;
}
/* skip past '=', then space between it and value, if any */
@@ -1962,12 +1964,14 @@ rcfile_interface_options(void)
heed_this_option(opt_windowtype);
heed_this_option(opt_soundlib);
set_ignore_errors_on_unmatched();
ignore_statement_errors = TRUE;
rcfile();
heed_all_config_statements();
heed_all_options();
disregard_this_option(opt_windowtype);
disregard_this_option(opt_soundlib);
clear_ignore_errors_on_unmatched();
ignore_statement_errors = FALSE;
}
void

View File

@@ -238,6 +238,8 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
windowtype); /* sets all the window port function pointers */
init_nhwindows(&argc, argv);
/* if (GUILaunched || IsDebuggerPresent()) */
getreturn_enabled = TRUE;
#if defined(CHDIR) && !defined(NOCWD_ASSUMPTIONS)
/* Save current directory and make sure it gets restored when
@@ -261,8 +263,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
chdir(gf.fqn_prefix[HACKPREFIX]);
#endif
/* if (GUILaunched || IsDebuggerPresent()) */
getreturn_enabled = TRUE;
check_recordfile((char *) 0);
/* did something earlier flag a need to exit without starting a game? */