[gtk/win32-egl-cleanup: 5/5] gdkdisplay-win32.c: Fix builds without EGL




commit c80af5e93b60d0812de24d4099bccae184f8f664
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Thu Oct 7 22:59:37 2021 +0800

    gdkdisplay-win32.c: Fix builds without EGL
    
    We can only call gdk_display_get_egl_display() if EGL was enabled, otherwise
    things calling gdk_win32_display_get_egl_display() will fail to link.

 gdk/win32/gdkdisplay-win32.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c
index dd40b5c13a..28c217c66a 100644
--- a/gdk/win32/gdkdisplay-win32.c
+++ b/gdk/win32/gdkdisplay-win32.c
@@ -1225,7 +1225,11 @@ gdk_win32_display_get_egl_display (GdkDisplay *display)
 {
   g_return_val_if_fail (GDK_IS_WIN32_DISPLAY (display), NULL);
 
+#ifdef HAVE_EGL
   return gdk_display_get_egl_display (display);
+#else
+  return NULL;
+#endif
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]