From 8ee0ccef9128a6a0dc8fcdba09dc9a76194f3f7e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 8 Dec 2018 21:25:02 +0100 Subject: gui/init: fix evil typo --- gui/init.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gui/init.cpp') 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 -- cgit v1.2.3