Windows logging tweaks.
Restore the freopen calls, though I am unsure exactly what they achieve.
This commit is contained in:
parent
02be490466
commit
523b992b4c
@ -34,6 +34,11 @@
|
|||||||
|
|
||||||
#include <simgear/misc/sg_path.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
// for AllocConsole
|
||||||
|
#include "windows.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
const char* debugClassToString(sgDebugClass c)
|
const char* debugClassToString(sgDebugClass c)
|
||||||
{
|
{
|
||||||
switch (c) {
|
switch (c) {
|
||||||
@ -97,6 +102,9 @@ public:
|
|||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
AllocConsole(); // but only if we want a console
|
AllocConsole(); // but only if we want a console
|
||||||
|
freopen("conin$", "r", stdin);
|
||||||
|
freopen("conout$", "w", stdout);
|
||||||
|
freopen("conout$", "w", stderr);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user