some further startup, option processing bits

This commit is contained in:
nhmall
2026-04-23 14:31:43 -04:00
parent 21f0e18595
commit 93ab8405d8
5 changed files with 17 additions and 13 deletions

View File

@@ -123,10 +123,6 @@ main(int argc, char *argv[])
dir = nh_getenv("HACKDIR");
#endif /* CHDIR */
program_state.early_options = 1;
#ifdef ENHANCED_SYMBOLS
if (argcheck(argc, argv, ARG_DUMPGLYPHIDS) == 2)
exit(EXIT_SUCCESS);
#endif
/* handle -dalthackdir, -s <score stuff>, --version, --showpaths */
early_options(&argc, &argv, &dir);
program_state.early_options = 0;

View File

@@ -167,12 +167,6 @@ MAIN(int argc, char *argv[])
/* setting iflags.colorcount has to be after early_init()
* because it zeros out all of iflags */
hwnd = GetDesktopWindow();
hdc = GetDC(hwnd);
if (hdc) {
bpp = GetDeviceCaps(hdc, BITSPIXEL);
iflags.colorcount = (bpp >= 16) ? 16777216 : (bpp >= 8) ? 256 : 16;
ReleaseDC(hwnd, hdc);
}
#ifdef _MSC_VER
#ifdef DEBUG
@@ -201,6 +195,15 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
#ifndef MSWIN_GRAPHICS
early_init(argc, argv); /* already in WinMain for MSWIN_GRAPHICS */
#endif
/* this must be done after early_init() because early_init()
sets iflags to zero */
hdc = GetDC(hwnd);
if (hdc) {
bpp = GetDeviceCaps(hdc, BITSPIXEL);
iflags.colorcount = (bpp >= 16) ? 16777216 : (bpp >= 8) ? 256 : 16;
ReleaseDC(hwnd, hdc);
}
gh.hname = "NetHack"; /* used for syntax messages */
set_default_prefix_locations(
argv[0]); /* must be re-done after initoptions_init()