From f8fbd9848eff1fef75e7cb30b70553296e052c3b Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 8 Apr 2026 10:32:29 -0400 Subject: [PATCH] a couple more minor startup tweaks --- src/cfgfiles.c | 8 ++++++-- sys/windows/windmain.c | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/cfgfiles.c b/src/cfgfiles.c index 331f90134..89ffbd4ab 100644 --- a/src/cfgfiles.c +++ b/src/cfgfiles.c @@ -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 diff --git a/sys/windows/windmain.c b/sys/windows/windmain.c index c50a6d292..37a202378 100644 --- a/sys/windows/windmain.c +++ b/sys/windows/windmain.c @@ -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? */