Fix the console window not appearing even when requested.

This commit is contained in:
Alexander Babikov
2020-11-09 04:42:14 +05:00
parent 0deb6b96c3
commit abd23f41bb

View File

@@ -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);