mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 02:15:34 +00:00
app/internal/egl: don't exit if EGL dlls fails to load
We want a useful error instead of a hard exit for headless windows. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -87,6 +87,9 @@ func (c *Context) Present() error {
|
||||
}
|
||||
|
||||
func NewContext(disp NativeDisplayType) (*Context, error) {
|
||||
if err := loadEGL(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
eglDisp := eglGetDisplay(disp)
|
||||
if eglDisp == nilEGLDisplay {
|
||||
return nil, fmt.Errorf("eglGetDisplay failed: 0x%x", eglGetError())
|
||||
|
||||
Reference in New Issue
Block a user