summary refs log tree commit diff stats
path: root/ui/gtk.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-06-26 16:44:57 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-06-26 16:44:57 +0100
commit0ab4c574a55448a37b9f616259b82950742c9427 (patch)
tree760945aa3534ab90f10959e58870cc8a394502fe /ui/gtk.c
parentbd4e4a387aa733e40270a7406c7d111f2292de65 (diff)
parent49213b721f4620364aa09142b5f4d559fed26b53 (diff)
downloadfocaccia-qemu-0ab4c574a55448a37b9f616259b82950742c9427.tar.gz
focaccia-qemu-0ab4c574a55448a37b9f616259b82950742c9427.zip
Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180626-pull-request' into staging
ui: sdl2 fixes, gles support.

# gpg: Signature made Tue 26 Jun 2018 14:56:15 BST
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/ui-20180626-pull-request:
  sdl2: add checking for NULL
  sdl2: fix copypaste issues
  Add gles support to egl-helpers, wire up in egl-headless and gtk.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'ui/gtk.c')
-rw-r--r--ui/gtk.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ui/gtk.c b/ui/gtk.c
index 903f136b8f..5cce6ed42d 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -2485,10 +2485,6 @@ static void early_gtk_display_init(DisplayOptions *opts)
 
     assert(opts->type == DISPLAY_TYPE_GTK);
     if (opts->has_gl && opts->gl != DISPLAYGL_MODE_OFF) {
-        if (opts->gl == DISPLAYGL_MODE_ES) {
-            error_report("gtk: opengl es not supported");
-            return;
-        }
 #if defined(CONFIG_OPENGL)
 #if defined(CONFIG_GTK_GL) && defined(GDK_WINDOWING_WAYLAND)
         if (GDK_IS_WAYLAND_DISPLAY(gdk_display_get_default())) {
@@ -2497,7 +2493,8 @@ static void early_gtk_display_init(DisplayOptions *opts)
         } else
 #endif
         {
-            gtk_egl_init();
+            DisplayGLMode mode = opts->has_gl ? opts->gl : DISPLAYGL_MODE_ON;
+            gtk_egl_init(mode);
         }
 #endif
     }