Commit fbd57c75 authored by Alexander Kanavin's avatar Alexander Kanavin Committed by Gerd Hoffmann
Browse files

egl-helpers.h: do not depend on X11 Window type, use EGLNativeWindowType



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: default avatarAlexander Kanavin <alex.kanavin@gmail.com>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20190116113751.17177-1-alex.kanavin@gmail.com

[ kraxel: codestyle fix (long line) ]

Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent 61e77a5f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
+2 −2
Original line number Diff line number Diff line
@@ -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;
+2 −1
Original line number Diff line number Diff line
@@ -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);
}