Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Allow you to override SDL's main override

  • Loading branch information
slouken committed Feb 16, 2011
1 parent 0b4d50d commit be278c4d8b0de0426b9bbea0c3d92f1724f1d0a3

File 1 of 1 in be278c4

@@ -31,10 +31,11 @@
* Redefine main() on some platforms so that it is called by SDL.
*/

#if defined(__WIN32__) || \
(defined(__MWERKS__) && !defined(__BEOS__)) || \
defined(__SYMBIAN32__) || defined(__IPHONEOS__) || \
defined(__ANDROID__)
#if defined(__WIN32__) || defined(__IPHONEOS__) || defined(__ANDROID__)
#ifndef SDL_MAIN_HANDLED
#define SDL_MAIN_NEEDED
#endif
#endif

#ifdef __cplusplus
#define C_LINKAGE "C"
@@ -57,40 +58,41 @@
* \endcode
*/

#ifdef SDL_MAIN_NEEDED
#define main SDL_main
#endif

/**
* The prototype for the application's main() function
*/
extern C_LINKAGE int SDL_main(int argc, char *argv[]);


/* From the SDL library code -- needed for registering the app on Win32 */
#ifdef __WIN32__

#include "begin_code.h"
#ifdef __cplusplus
/* *INDENT-OFF* */
extern "C" {
/* *INDENT-ON* */
#endif

#ifdef __WIN32__

/**
* This can be called to set the application class at startup
*/
extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style,
void *hInst);
extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);

#endif /* __WIN32__ */


#ifdef __cplusplus
/* *INDENT-OFF* */
}
/* *INDENT-ON* */
#endif
#include "close_code.h"
#endif

#endif /* Need to redefine main()? */

#endif /* _SDL_main_h */

0 comments on commit be278c4

Please sign in to comment.