From 523b992b4cf76f73aaa1129d23d89809b00adeb3 Mon Sep 17 00:00:00 2001 From: James Turner Date: Thu, 7 Feb 2013 17:23:31 +0000 Subject: [PATCH] Windows logging tweaks. Restore the freopen calls, though I am unsure exactly what they achieve. --- simgear/debug/logstream.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/simgear/debug/logstream.cxx b/simgear/debug/logstream.cxx index 91ee4ebe..207f3896 100644 --- a/simgear/debug/logstream.cxx +++ b/simgear/debug/logstream.cxx @@ -34,6 +34,11 @@ #include +#ifdef _WIN32 +// for AllocConsole + #include "windows.h" +#endif + const char* debugClassToString(sgDebugClass c) { switch (c) { @@ -97,6 +102,9 @@ public: { #ifdef _WIN32 AllocConsole(); // but only if we want a console + freopen("conin$", "r", stdin); + freopen("conout$", "w", stdout); + freopen("conout$", "w", stderr); #endif } -- 2.39.5