Suggestion: console_main() should return value from SDL_main() for WIN32

In our main() routine (which is really SDL_main() because of a sneaky
#define), we want to return a non-zero value so that the return code can
be checked from a batch file.

Unfortunately, the code in SDL_win32_main.c does not return the value to
the OS.

The existing code…

/* Run the application main() code */
SDL_main(argc, argv);

/* Exit cleanly, calling atexit() functions */
exit(0);

/* Hush little compiler, don't you cry... */
return(0);

It would be better to do something like this…

/* Run the application main() code */
ret = SDL_main(argc, argv);

/* Exit cleanly, calling atexit() functions */
exit(ret);

/* Hush little compiler, don't you cry... */
return(ret);

This fix would make my code work properly since the return from my
main() routine would then get passed back to the OS.

Doug.

In our main() routine (which is really SDL_main() because of a sneaky
#define), we want to return a non-zero value so that the return code can
be checked from a batch file.

Fixed in CVS, thanks!

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment