From cb191e6a0e7d548453747a4ffe7f39db002c382d Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 9 Dec 2018 10:14:19 -0500 Subject: [PATCH] more windmain --- sys/winnt/windmain.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index 72bf24c11..21a2fa1e2 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -35,7 +35,7 @@ char FDECL(windows_yn_function, (const char *, const char *, CHAR_P)); void FDECL(windows_getlin, (const char *, char *)); char orgdir[PATHLEN]; -extern boolean getreturn_enabled; /* from sys/share/pcsys.c */ +boolean getreturn_enabled; extern int redirect_stdout; /* from sys/share/pcsys.c */ extern int GUILaunched; HANDLE hStdOut; @@ -58,7 +58,6 @@ mingw_main(argc, argv) int argc; char *argv[]; { - boolean save_getreturn_status = getreturn_enabled; boolean resuming = FALSE; /* assume new game */ register int fd; register char *dir; @@ -199,8 +198,9 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ } } } - save_getreturn_status = getreturn_enabled; - getreturn_enabled = TRUE; + if (GUILaunched || IsDebuggerPresent()) { + getreturn_enabled = TRUE; + } check_recordfile((char *) 0); initoptions(); if (!validate_prefix_locations(failbuf)) { @@ -307,7 +307,6 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ } } } - getreturn_enabled = save_getreturn_status; /* * It seems you really want to play. @@ -393,7 +392,6 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ */ vision_init(); display_gamewindows(); - getreturn_enabled = TRUE; /* * First, try to find and restore a save file for specified character. * We'll return here if new game player_selection() renames the hero.