Index: sdl.c =================================================================== RCS file: /home/malc/cvsroot/qemu/sdl.c,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 sdl.c --- sdl.c 27 Oct 2005 11:57:02 -0000 1.1.1.1 +++ sdl.c 29 Oct 2005 17:14:12 -0000 @@ -55,11 +55,22 @@ flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL; if (gui_fullscreen) flags |= SDL_FULLSCREEN; + + again: screen = SDL_SetVideoMode(w, h, 0, flags); if (!screen) { fprintf(stderr, "Could not open SDL display\n"); exit(1); } + if (!screen->pixels && (flags & SDL_HWSURFACE) && (flags & SDL_FULLSCREEN)) { + flags &= ~SDL_HWSURFACE; + goto again; + } + + if (!screen->pixels) { + fprintf(stderr, "Could not open SDL display\n"); + exit(1); + } ds->data = screen->pixels; ds->linesize = screen->pitch; ds->depth = screen->format->BitsPerPixel;