[Scummvm-devel] MSVC9 -Project files

Travis Howell kirben at optusnet.com.au
Fri Apr 3 00:53:20 CEST 2009

Norbert Lange wrote:
> Also, a question about the Programmstart, this is how its done currently  
> on Win32:
> *) #define main as SDL_Main (is it just me or is this buttugly?)   
> [SDL_Main.h#50]
> *) implement WinMain() to initialise SDL, then call main() (which is a  
> macro to SDL_Main)
> *) setup linker for a console-app
> *) and then manually specify WinMain() as entrypoint?
> whats speaking against the simple way of just adding the needed couple of  
> lines to initialise SDL in the normal main() routine instead?
> .
> #if defined (WIN32)
> 	SDL_SetModuleHandle(GetModuleHandle(NULL));
> #endif
> .
> done that and it compiles, links and runs just fine. This weird  
> main-renaming stuff aint needed IMHO!?! (might be it was needed sometime)

The weird code is required to make ScummVM use a console window, and 
make sure all output from ScummVM is directed to the console window.

If your code is used, the console is still opened, but the output from 
ScummVM is directed to stdout.txt/stderr.txt files.

More information about the Scummvm-devel mailing list