From: James Turner Date: Thu, 7 Feb 2013 17:23:31 +0000 (+0000) Subject: Windows logging tweaks. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=523b992b4cf76f73aaa1129d23d89809b00adeb3;p=simgear.git Windows logging tweaks. Restore the freopen calls, though I am unsure exactly what they achieve. --- 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 }