diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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(); |