summaryrefslogtreecommitdiff
path: root/src/main.c
blob: f6ff045dc03a055b98e2e6a29feb557691ab75ae (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
#include <the_Foundation/commandline.h>
#include <stdio.h>
#if defined (iPlatformMsys)
#  define SDL_MAIN_HANDLED
#endif
#include <SDL.h>

#include "app.h"

int main(int argc, char **argv) {
#if defined (iPlatformMsys)
    /* MSYS runtime takes care of WinMain. */
    SDL_SetMainReady();
#endif
    init_Foundation();
    printf("Lagrange: A Beautiful Gemini Client\n");
    /* Initialize SDL. */
    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;
}