mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
SDL full screen patch for Windows (malc)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1595 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
c53be33474
commit
9903da21e3
1 changed files with 11 additions and 0 deletions
11
sdl.c
11
sdl.c
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue