diff options
author | Travis Howell | 2006-04-02 13:33:36 +0000 |
---|---|---|
committer | Travis Howell | 2006-04-02 13:33:36 +0000 |
commit | 72f4a1c76cb8aedf6f953e57090134320d7291b8 (patch) | |
tree | 5dcb15660fd2a9e159b326533ef50d852fcd4f59 /backends/sdl | |
parent | f8bb142f0b7c9ef73a0521199c18e076a259d2c1 (diff) | |
download | scummvm-rg350-72f4a1c76cb8aedf6f953e57090134320d7291b8.tar.gz scummvm-rg350-72f4a1c76cb8aedf6f953e57090134320d7291b8.tar.bz2 scummvm-rg350-72f4a1c76cb8aedf6f953e57090134320d7291b8.zip |
Fix console output been redirected under win32 build, due to main changes. Remove NO_CONSOLE, since it is never defined
svn-id: r21554
Diffstat (limited to 'backends/sdl')
-rw-r--r-- | backends/sdl/sdl.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/backends/sdl/sdl.cpp b/backends/sdl/sdl.cpp index 0a2de847e1..4fa64e75d2 100644 --- a/backends/sdl/sdl.cpp +++ b/backends/sdl/sdl.cpp @@ -37,31 +37,28 @@ const char* stackCookie = "$STACK: 655360\0"; #endif -#if defined(WIN32) && defined(NO_CONSOLE) -#include <cstdio> -#define STDOUT_FILE TEXT("stdout.txt") -#define STDERR_FILE TEXT("stderr.txt") -#endif - - #if !defined(_WIN32_WCE) && !defined(__MAEMO__) +#if defined (WIN32) +int WinMain(HINSTANCE /*hInst*/, HINSTANCE /*hPrevInst*/, LPSTR /*lpCmdLine*/, int /*iShowCmd*/) { + return main(__argc, __argv); +} +#endif + int main(int argc, char *argv[]) { -#if (defined(WIN32) && defined(NO_CONSOLE)) || defined(__SYMBIAN32__) +#if defined(__SYMBIAN32__) // // Set up redirects for stdout/stderr under Windows and Symbian. // Code copied from SDL_main. // // Symbian does not like any output to the console through any *print* function -#if defined(__SYMBIAN32__) char STDOUT_FILE[256], STDERR_FILE[256]; // shhh, don't tell anybody :) strcpy(STDOUT_FILE, Symbian::GetExecutablePath()); strcpy(STDERR_FILE, Symbian::GetExecutablePath()); strcat(STDOUT_FILE, "scummvm.stdout.txt"); strcat(STDERR_FILE, "scummvm.stderr.txt"); -#endif /* Flush the output in case anything is queued */ fclose(stdout); @@ -90,12 +87,9 @@ int main(int argc, char *argv[]) { } #endif } -#ifndef __SYMBIAN32__ // fcn not supported on Symbian - setlinebuf(stdout); /* Line buffered */ -#endif setbuf(stderr, NULL); /* No buffering */ -#endif // (defined(WIN32) && defined(NO_CONSOLE)) || defined(__SYMBIAN32__) +#endif // defined(__SYMBIAN32__) // Invoke the actual ScummVM main entry point: |