blob: 38d01b94c1dc24f6385ec70e21dee3020f5006e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#include <the_Foundation/commandline.h>
#include <stdio.h>
#if defined (iPlatformMsys)
# define SDL_MAIN_HANDLED
#endif
#include <SDL.h>
#include "app.h"
#if defined (iPlatformApple)
extern void enableMomentumScroll_MacOS(void);
#endif
int main(int argc, char **argv) {
#if defined (iPlatformApple)
enableMomentumScroll_MacOS();
#endif
#if defined (iPlatformMsys)
/* MSYS runtime takes care of WinMain. */
SDL_SetMainReady();
#endif
init_Foundation();
printf("Lagrange: A Beautiful Gemini Client\n");
/* Initialize SDL. */
SDL_SetHint(SDL_HINT_VIDEO_ALLOW_SCREENSAVER, "1");
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER)) {
fprintf(stderr, "SDL init failed: %s\n", SDL_GetError());
return -1;
}
run_App(argc, argv);
SDL_Quit();
return 0;
}
|