aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index f07e829..9426896 100644
--- a/src/main.c
+++ b/src/main.c
@@ -31,6 +31,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <glib.h>
+#include <SDL.h>
#include "types.h"
#include "mainwindow.h"
@@ -43,6 +44,12 @@ int main(int argc, char *argv[]) {
gtk_init(&argc, &argv);
g_thread_init(NULL);
+ if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
+ fprintf(stderr, "Couldn't initialise SDL: %s\n", SDL_GetError());
+ return 1;
+ }
+ atexit(SDL_Quit);
+
/* Start the accelerometer thread */
accelerometer_start();