>From 2d4522de5c0772019c15a5ff8ba4ae57a9313510 Mon Sep 17 00:00:00 2001 From: Michael S. Tsirkin Date: Wed, 30 Dec 2009 11:17:05 +0200 X-Mutt-Fcc: =sent Subject: [PATCH] sdl: print error before exiting Print out SDL_GetError before exit to help people diagnose SDL problems. Signed-off-by: Michael S. Tsirkin --- sdl.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/sdl.c b/sdl.c index 034440f..8483bf9 100644 --- a/sdl.c +++ b/sdl.c @@ -850,6 +850,7 @@ 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, "SDL error: %s\n", SDL_GetError()); exit(1); } vi = SDL_GetVideoInfo(); -- 1.6.6.rc1.43.gf55cc