diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-10-30 23:19:10 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-10-30 23:19:10 +0000 |
commit | 9903da21e34d84a01ab6dfc30a01f619e6ef5415 (patch) | |
tree | 7df3859629159072314971ff01d2682b6d89304e /sdl.c | |
parent | c53be3347484b0f73deebcfa2e5faf538d6fa7c0 (diff) | |
download | qemu-9903da21e34d84a01ab6dfc30a01f619e6ef5415.tar.gz qemu-9903da21e34d84a01ab6dfc30a01f619e6ef5415.tar.bz2 qemu-9903da21e34d84a01ab6dfc30a01f619e6ef5415.zip |
SDL full screen patch for Windows (malc)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1595 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'sdl.c')
-rw-r--r-- | sdl.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -55,11 +55,22 @@ static void sdl_resize(DisplayState *ds, int w, int h) 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; |