## page was renamed from SDL_ #pragma section-numbers off #pragma camelcase off ||DRAFT || ##You will need to remove the line #acl All:read above in order to be able to save the new page. Do not remove any other content above this comment. You may delete this comment before you save. ##*^*^*^*^*See http://wiki.libsdl.org/moin.cgi/SGFunctions for details on editing this page*^*^*^*^* = SDL_SetMainReady = Use this function to circumvent failure of [[SDL_Init]]() when not using SDL_main() as an entry point. ##Replace SDL_Function with the name of the function and ****** with a short description of the function according to the Style Guide, then delete this comment. <> == Syntax == {{{#!highlight cpp void SDL_SetMainReady(void) }}} == Code Examples == {{{#!highlight cpp #define SDL_MAIN_HANDLED #include "SDL.h" int main(int argc, char *argv[]) { SDL_SetMainReady(); SDL_Init(SDL_INIT_VIDEO); ... SDL_Quit(); return 0; } }}} == Remarks == This function is defined in SDL_main.h, along with the preprocessor rule to redefine main() as SDL_main(). Thus to ensure that your main() function will not be changed it is necessary to define SDL_MAIN_HANDLED before including SDL.h. == Related Functions == . [[SDL_Init]] ---- [[CategoryAPI]], [[CategoryInit]]