startup sequence and iflags values

early_init() calls decl_globals_init() which zeros out
a number structures:
    ZERO(flags);
    ZERO(iflags);
    ZERO(a11y);
    ZERO(disp);
    ZERO(u);
    ZERO(ubirthday);
    ZERO(urealtime);

Setting values in any of those during startup prior to
the early_init() call was futile, and the values would
get overwritten.

Such was the case with the setting of iflags.colorcount
during Windows startup, so do it after early_init() has
been called.
This commit is contained in:
nhmall
2024-03-25 22:30:08 -04:00
parent 875c83cc2c
commit 66f92ad182
2 changed files with 13 additions and 9 deletions

View File

@@ -997,10 +997,6 @@ tty_startup(int *wid, int *hgt)
*wid = console.width;
*hgt = console.height;
set_option_mod_status("mouse_support", set_in_game);
if (iflags.colorcount == 0) {
iflags.colorcount = 16777216;
// iflags.colorcount = 256;
}
}
void
@@ -2406,11 +2402,6 @@ void nethack_enter_consoletty(void)
#ifdef VIRTUAL_TERMINAL_SEQUENCES
char buf[BUFSZ], *bp, *localestr;
BOOL success;
if (iflags.colorcount == 0) {
iflags.colorcount = 16777216;
// iflags.colorcount = 256;
}
#endif /* VIRTUAL_TERMINAL_SEQUENCES */
#if 0
/* set up state needed by early_raw_print() */