app/internal/egl: remove Windows error message dialog when EGL fails to load

The error message is not appropriate where there are multiple backends,
and there's a much better chance Gio will run with the direct3d backend
where no external DLLs are required.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-02-15 19:41:37 +01:00
parent cf7d702a39
commit 1f43bfa0e4
+4 -7
View File
@@ -65,14 +65,11 @@ func loadDLLs() error {
}
func loadDLL(dll *syscall.LazyDLL, name string) error {
loadErr := dll.Load()
if loadErr == nil {
return nil
err := dll.Load()
if err != nil {
return fmt.Errorf("egl: failed to load %s: %v", name, err)
}
pmsg := syscall.StringToUTF16Ptr("Failed to load " + name + ". Gio requires the ANGLE OpenGL ES driver to run. A prebuilt version can be downloaded from https://gioui.org/doc/install.")
ptitle := syscall.StringToUTF16Ptr("Error")
syscall.MessageBox(0 /* HWND */, pmsg, ptitle, syscall.MB_ICONERROR|syscall.MB_SYSTEMMODAL)
return fmt.Errorf("egl: failed to load %s", name)
return nil
}
func eglChooseConfig(disp _EGLDisplay, attribs []_EGLint) (_EGLConfig, bool) {