From 04ff1a398a8d6e912eceaca9b62af0a09e927d63 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Mon, 15 Jan 2018 16:48:55 +0100 Subject: sdl: reorganize -no-frame support Drop no_frame flag from sdl_display_init argument list, use a global variable instead. This is temporary until -no-frame support is dropped altogether when we remove sdl1 support. Remove any traces of noframe from sdl2 code. It is just dead code as sdl2 doesn't support the SDL_NOFRAME window flag any more. Signed-off-by: Gerd Hoffmann Message-id: 20180115154855.30850-3-kraxel@redhat.com --- ui/sdl.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'ui/sdl.c') diff --git a/ui/sdl.c b/ui/sdl.c index 0017b4a912..c8f102bb9f 100644 --- a/ui/sdl.c +++ b/ui/sdl.c @@ -50,7 +50,6 @@ static int gui_saved_width; static int gui_saved_height; static int gui_saved_grab; static int gui_fullscreen; -static int gui_noframe; static int gui_key_modifier_pressed; static int gui_keysym; static int gui_grab_code = KMOD_LALT | KMOD_LCTRL; @@ -118,8 +117,9 @@ static void do_sdl_resize(int width, int height, int bpp) } else { flags |= SDL_RESIZABLE; } - if (gui_noframe) + if (no_frame) { flags |= SDL_NOFRAME; + } tmp_screen = SDL_SetVideoMode(width, height, bpp, flags); if (!real_screen) { @@ -895,7 +895,7 @@ void sdl_display_early_init(int opengl) } } -void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) +void sdl_display_init(DisplayState *ds, int full_screen) { int flags; uint8_t data = 0; @@ -917,9 +917,6 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) g_printerr("Running QEMU with SDL 1.2 is deprecated, and will be removed\n" "in a future release. Please switch to SDL 2.0 instead\n"); - if (no_frame) - gui_noframe = 1; - if (!full_screen) { setenv("SDL_VIDEO_ALLOW_SCREENSAVER", "1", 0); } -- cgit v1.2.3-55-g7522