From abd23f41bb3d0818fbca08c36d03a5fb67f6457f Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Mon, 9 Nov 2020 04:42:14 +0500 Subject: [PATCH] Fix the console window not appearing even when requested. --- src/win/win.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/win/win.c b/src/win/win.c index 9fe724dcd..541a05d1a 100644 --- a/src/win/win.c +++ b/src/win/win.c @@ -366,10 +366,6 @@ WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpszArg, int nCmdShow) /* First, set our (default) language. */ set_language(0x0409); - /* Create console window. */ - if (force_debug) - CreateConsole(1); - /* Process the command line for options. */ argc = ProcessCommandLine(&argw); @@ -391,8 +387,11 @@ WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpszArg, int nCmdShow) if (enable_crashdump) InitCrashDump(); - if (force_debug) + /* Create console window. */ + if (force_debug) { + CreateConsole(1); atexit(CloseConsole); +} /* Handle our GUI. */ i = ui_init(nCmdShow);