diff mbox series

[PULL,25/33] ui/egl: default to GLES on windows

Message ID 20230627130231.1614896-26-marcandre.lureau@redhat.com
State New
Headers show
Series [PULL,01/33] ui: return NULL when getting cursor without a console | expand

Commit Message

Marc-André Lureau June 27, 2023, 1:02 p.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Windows GL drivers are notoriously not very good. Otoh, ANGLE provides
rock solid GLES implementation on top of direct3d. We should recommend
it and default to ES when using EGL (users can easily override this if
necessary)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230606115658.677673-14-marcandre.lureau@redhat.com>
---
 ui/egl-helpers.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c
index d1ef3c07dd..c2a3ace743 100644
--- a/ui/egl-helpers.c
+++ b/ui/egl-helpers.c
@@ -535,6 +535,10 @@  int qemu_egl_init_dpy_mesa(EGLNativeDisplayType dpy, DisplayGLMode mode)
 #ifdef WIN32
 int qemu_egl_init_dpy_win32(EGLNativeDisplayType dpy, DisplayGLMode mode)
 {
+    /* prefer GL ES, as that's what ANGLE supports */
+    if (mode == DISPLAYGL_MODE_ON) {
+        mode = DISPLAYGL_MODE_ES;
+    }
     return qemu_egl_init_dpy(dpy, 0, mode);
 }
 #endif