summaryrefslogtreecommitdiff
path: root/src/main.c
blob: 457cc1f2e3a58db0c903ab4c7baa4cf30ad21549 (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)) {
        fprintf(stderr, "SDL init failed: %s\n", SDL_GetError());
        return -1;
    }
    run_App(argc, argv);
    SDL_Quit();
    return 0;
}