My Project
Loading...
Searching...
No Matches
SDL_main.h File Reference
#include "SDL_stdinc.h"
#include "begin_code.h"
#include "close_code.h"

Go to the source code of this file.

Typedefs

typedef int(* SDL_main_func) (int argc, char *argv[])
 

Functions

SDLMAIN_DECLSPEC int SDL_main (int argc, char *argv[])
 
DECLSPEC void SDLCALL SDL_SetMainReady (void)
 

Detailed Description

Redefine main() on some platforms so that it is called by SDL.

The application's main() function must be called with C linkage, and should be declared like this:

#ifdef __cplusplus
extern "C"
#endif
int main(int argc, char *argv[])
{
}
int main(int argc, char *args[])
programme principal qui implémente la boucle du jeu
Definition: main.c:99

Typedef Documentation

◆ SDL_main_func

typedef int(* SDL_main_func) (int argc, char *argv[])

The prototype for the application's main() function

Function Documentation

◆ SDL_SetMainReady()

DECLSPEC void SDLCALL SDL_SetMainReady ( void  )

Circumvent failure of SDL_Init() when not using SDL_main() as an entry point.

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.

Since
This function is available since SDL 2.0.0.
See also
SDL_Init