Skip to contentSkip to conversation

ui/sdl2: fix full screen initialization.

PATCH New Juan RP 1 participant 1 message Sep 3, 2014

lore
Share & tools
lore

Juan RP

author
#0 lore raw

PATCH 1/1 ui/sdl2: fix full screen initialization.

gui_fullscreen was not initialized before creating the window with SDL_CreateWindow(). Move initialization a bit early to fix the issue.

---
 ui/sdl2.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
ui/sdl2.c +5 -5
index fcac87b..04ffda3 100644
@@ -867,6 +867,11 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
         exit(1);
     }
 
+    if (full_screen) {
+        gui_fullscreen = 1;
+        sdl_grab_start(0);
+    }
+
     for (i = 0;; i++) {
         QemuConsole *con = qemu_console_lookup_by_index(i);
         if (!con) {
@@ -898,11 +903,6 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
         g_free(filename);
     }
 
-    if (full_screen) {
-        gui_fullscreen = 1;
-        sdl_grab_start(0);
-    }
-
     mouse_mode_notifier.notify = sdl_mouse_mode_change;
     qemu_add_mouse_mode_change_notifier(&mouse_mode_notifier);
 
Signature · 1 line
2.1.0