]> Git Repo - qemu.git/commitdiff
egl-helpers.h: do not depend on X11 Window type, use EGLNativeWindowType
authorAlexander Kanavin <[email protected]>
Wed, 16 Jan 2019 11:37:51 +0000 (12:37 +0100)
committerGerd Hoffmann <[email protected]>
Mon, 21 Jan 2019 08:44:32 +0000 (09:44 +0100)
It was assumed that mesa provides the necessary X11 includes,
but it is not always the case, as it can be configured without x11 support.

Signed-off-by: Alexander Kanavin <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20190116113751[email protected]

[ kraxel: codestyle fix (long line) ]

Signed-off-by: Gerd Hoffmann <[email protected]>
include/ui/egl-helpers.h
ui/egl-helpers.c
ui/gtk-egl.c

index 9db7293bdbac464de4b60094033bd3cda8ba691b..3fc656a7ba62655d8df350066634070fb7387166 100644 (file)
@@ -43,7 +43,7 @@ void egl_dmabuf_release_texture(QemuDmaBuf *dmabuf);
 
 #endif
 
-EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win);
+EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, EGLNativeWindowType win);
 
 int qemu_egl_init_dpy_x11(EGLNativeDisplayType dpy, DisplayGLMode mode);
 int qemu_egl_init_dpy_mesa(EGLNativeDisplayType dpy, DisplayGLMode mode);
index 4f475142fc677941afb01bfea781399feb9a6776..5e115b3fb494360a3593cf806f984e77c8671b35 100644 (file)
@@ -273,14 +273,14 @@ void egl_dmabuf_release_texture(QemuDmaBuf *dmabuf)
 
 /* ---------------------------------------------------------------------- */
 
-EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win)
+EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, EGLNativeWindowType win)
 {
     EGLSurface esurface;
     EGLBoolean b;
 
     esurface = eglCreateWindowSurface(qemu_egl_display,
                                       qemu_egl_config,
-                                      (EGLNativeWindowType)win, NULL);
+                                      win, NULL);
     if (esurface == EGL_NO_SURFACE) {
         error_report("egl: eglCreateWindowSurface failed");
         return NULL;
index 5420c2362bb1887263eb867b216728b6d3c1e4d5..afd17148c08ba9b5cab3bcabae859b1a0769762f 100644 (file)
@@ -54,7 +54,8 @@ void gd_egl_init(VirtualConsole *vc)
     }
 
     vc->gfx.ectx = qemu_egl_init_ctx();
-    vc->gfx.esurface = qemu_egl_init_surface_x11(vc->gfx.ectx, x11_window);
+    vc->gfx.esurface = qemu_egl_init_surface_x11
+        (vc->gfx.ectx, (EGLNativeWindowType)x11_window);
 
     assert(vc->gfx.esurface);
 }
This page took 0.032389 seconds and 4 git commands to generate.