blob: 65816bcc8f2a245d64c3e1fca351628837ede93e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#include <stdio.h>
#include <stdbool.h>
#include <SDL3/SDL.h>
#include <SDL3_ttf/SDL_ttf.h>
#include <saffron.h> /* meson include directories */
bool saffron_init(void) {
if (!SDL_Init(SDL_INIT_VIDEO)) {
printf("[Saffron] SDL init failed: %s\n", SDL_GetError());
return false;
}
if (!TTF_Init()) {
printf("[Saffron] TTF init failed: %s\n", SDL_GetError());
return false;
}
return true;
}
void saffron_quit(void) {
TTF_Quit();
SDL_Quit();
}
|