Avoids attempting to use EGL in visual_from_pixel_format, even when it may not be usable.
From: Tim Clem tclem@codeweavers.com
Avoids attempting to use EGL in visual_from_pixel_format, even when it may not be usable. --- dlls/winex11.drv/opengl.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index c1e4ca8d5af..e968f197fb3 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -564,6 +564,11 @@ UINT X11DRV_OpenGLInit( UINT version, const struct opengl_funcs *opengl_funcs, c *driver_funcs = &x11drv_driver_funcs; return STATUS_SUCCESS; } + else if (use_egl) + { + ERR( "Unable to initialize EGL; falling back to libGL\n" ); + use_egl = FALSE; + }
/* No need to load any other libraries as according to the ABI, libGL should be self-sufficient and include all dependencies */
Alternatively, visual_from_pixel_format could check `funcs->egl_handle`, but adjusting `use_egl` seemed cleaner (& preventative of future bugs).
Rémi Bernon (@rbernon) commented about dlls/winex11.drv/opengl.c:
*driver_funcs = &x11drv_driver_funcs; return STATUS_SUCCESS; }
- else if (use_egl)
- {
ERR( "Unable to initialize EGL; falling back to libGL\n" );use_egl = FALSE;- }
I don't think we want to print an error, it's just a default and we should let win32u actually decide to fallback. Let's just change to:
```suggestion:-4+0 use_egl = FALSE; ```