diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/init.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gui/init.cpp b/gui/init.cpp index 4609d535..a30e185a 100644 --- a/gui/init.cpp +++ b/gui/init.cpp @@ -164,10 +164,8 @@ static void add_win32_path() static void attach_parent_console() { - std::fflush(stdin); - std::fflush(stderr); - - (void)qInstallMessageHandler(qdebug_to_console); + fflush(stdin); + fflush(stderr); if (AttachConsole(ATTACH_PARENT_PROCESS)) { @@ -176,12 +174,14 @@ static void attach_parent_console() _wfreopen(L"CON", L"r", stdin); freopen("CON", "w", stdout); freopen("CON", "w", stderr); - freopen("CON", "w", stderr); + freopen("CON", "r", stdin); // skip prompt in cmd.exe window fprintf(stderr, "\n"); fflush(stderr); } + + (void)qInstallMessageHandler(qdebug_to_console); } #endif |