OSDN Git Service

sdl: print the reason why SDL thinks SDL_Init failed before exiting
authormalc <av1474@comtv.ru>
Wed, 30 Dec 2009 01:26:34 +0000 (04:26 +0300)
committermalc <av1474@comtv.ru>
Wed, 30 Dec 2009 01:26:34 +0000 (04:26 +0300)
Signed-off-by: malc <av1474@comtv.ru>
sdl.c

diff --git a/sdl.c b/sdl.c
index 034440f..3317310 100644 (file)
--- a/sdl.c
+++ b/sdl.c
@@ -849,7 +849,8 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
 
     flags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE;
     if (SDL_Init (flags)) {
-        fprintf(stderr, "Could not initialize SDL - exiting\n");
+        fprintf(stderr, "Could not initialize SDL(%s) - exiting\n",
+                SDL_GetError());
         exit(1);
     }
     vi = SDL_GetVideoInfo();