From: Mateusz Majewski Date: Tue, 25 Mar 2025 12:08:06 +0000 (+0100) Subject: Only build qemu_egl_init_surface_x11 for GTK X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=22190336e18fca9bddb10cebe5070f937e0de14b;p=sdk%2Femulator%2Fqemu.git Only build qemu_egl_init_surface_x11 for GTK This function is used only by GTK in this QEMU version. The function causes issues for us, because it depends on the Window type, which is an X11-specific EGL alias. Therefore, the signature as is causes a build error on all non-Linux platforms. We could #define this type away, but since the function is not used anyway, it is probably better to not care about it at all. Change-Id: I122e6976de88760bcaa762daa70e93e6162edc18 --- diff --git a/include/ui/egl-helpers.h b/include/ui/egl-helpers.h index 03fcf4bba2..7eaa75e112 100644 --- a/include/ui/egl-helpers.h +++ b/include/ui/egl-helpers.h @@ -20,8 +20,12 @@ int egl_get_fd_for_texture(uint32_t tex_id, EGLint *stride, EGLint *fourcc); #endif +#ifdef CONFIG_GTK + EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win); +#endif + int qemu_egl_init_dpy(EGLNativeDisplayType dpy, bool gles, bool debug); EGLContext qemu_egl_init_ctx(void); diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c index 79cee0503a..990bc4939a 100644 --- a/ui/egl-helpers.c +++ b/ui/egl-helpers.c @@ -146,6 +146,8 @@ int egl_get_fd_for_texture(uint32_t tex_id, EGLint *stride, EGLint *fourcc) /* ---------------------------------------------------------------------- */ +#ifdef CONFIG_GTK + EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win) { EGLSurface esurface; @@ -170,6 +172,8 @@ EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win) return esurface; } +#endif /* CONFIG_GTK */ + /* ---------------------------------------------------------------------- */ int qemu_egl_init_dpy(EGLNativeDisplayType dpy, bool gles, bool debug)