From d63d307f6e00856dae25e9cd3d96bc0ba31ff107 Mon Sep 17 00:00:00 2001 From: bellard Date: Sun, 3 Oct 2004 13:29:03 +0000 Subject: -loadvm and -full-screen options git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1090 c046a42c-6fe2-441c-8c8c-71466251a162 --- sdl.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'sdl.c') diff --git a/sdl.c b/sdl.c index fc23ea9ea..c089f56f4 100644 --- a/sdl.c +++ b/sdl.c @@ -40,6 +40,7 @@ static int gui_saved_grab; static int gui_fullscreen; static int gui_key_modifier_pressed; static int gui_keysym; +static int gui_fullscreen_initial_grab; static void sdl_update(DisplayState *ds, int x, int y, int w, int h) { @@ -525,7 +526,8 @@ static void sdl_refresh(DisplayState *ds) } break; case SDL_ACTIVEEVENT: - if (gui_grab && (ev->active.gain & SDL_ACTIVEEVENTMASK) == 0) { + if (gui_grab && (ev->active.gain & SDL_ACTIVEEVENTMASK) == 0 && + !gui_fullscreen_initial_grab) { sdl_grab_end(); } break; @@ -540,7 +542,7 @@ static void sdl_cleanup(void) SDL_Quit(); } -void sdl_display_init(DisplayState *ds) +void sdl_display_init(DisplayState *ds, int full_screen) { int flags; @@ -566,4 +568,9 @@ void sdl_display_init(DisplayState *ds) gui_grab = 0; atexit(sdl_cleanup); + if (full_screen) { + gui_fullscreen = 1; + gui_fullscreen_initial_grab = 1; + sdl_grab_start(); + } } -- cgit v1.2.3-65-gdbad