aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-09-27 06:35:42 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-09-27 06:35:42 +0200
commita79655273be421852f02abf0527886d73ef4b301 (patch)
tree1a07ade1a4a3a1daeac7fe82cc7d185f8dff2720
parentff540759187395884a01945c640a67e9778dee1d (diff)
downloadosc-graphics-a79655273be421852f02abf0527886d73ef4b301.tar.gz
disable SDL's stdio redirection on Windows
-rw-r--r--main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index 19ed0f9..d31f14f 100644
--- a/main.cpp
+++ b/main.cpp
@@ -179,6 +179,12 @@ main(int argc, char **argv)
port, sdl_flags, show_cursor,
width, height, bpp, framerate);
+#ifdef __WIN32__
+ /* disable SDL's stdio redirect */
+ freopen("CON", "w", stdout);
+ freopen("CON", "w", stderr);
+#endif
+
if (SDL_Init(SDL_INIT_VIDEO)) {
SDL_ERROR("SDL_Init");
return EXIT_FAILURE;