diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c new file mode 100644 index 00000000..457cc1f2 --- /dev/null +++ b/src/main.c | |||
@@ -0,0 +1,25 @@ | |||
1 | #include <the_Foundation/commandline.h> | ||
2 | #include <stdio.h> | ||
3 | #if defined (iPlatformMsys) | ||
4 | # define SDL_MAIN_HANDLED | ||
5 | #endif | ||
6 | #include <SDL.h> | ||
7 | |||
8 | #include "app.h" | ||
9 | |||
10 | int main(int argc, char **argv) { | ||
11 | #if defined (iPlatformMsys) | ||
12 | /* MSYS runtime takes care of WinMain. */ | ||
13 | SDL_SetMainReady(); | ||
14 | #endif | ||
15 | init_Foundation(); | ||
16 | printf("Lagrange: A Beautiful Gemini Client\n"); | ||
17 | /* Initialize SDL. */ | ||
18 | if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO)) { | ||
19 | fprintf(stderr, "SDL init failed: %s\n", SDL_GetError()); | ||
20 | return -1; | ||
21 | } | ||
22 | run_App(argc, argv); | ||
23 | SDL_Quit(); | ||
24 | return 0; | ||
25 | } | ||