uidriver/glfw: Bug fix: errors are ignored at (*UserInterface).run

Updates #978
This commit is contained in:
Hajime Hoshi 2019-11-10 19:09:38 +09:00
parent d43e203ccf
commit 572780ed6d

View File

@ -586,7 +586,7 @@ func (u *UserInterface) RunWithoutMainLoop(width, height int, scale float64, tit
} }
func (u *UserInterface) run(width, height int, scale float64, title string, context driver.UIContext) error { func (u *UserInterface) run(width, height int, scale float64, title string, context driver.UIContext) error {
_ = u.t.Call(func() error { if err := u.t.Call(func() error {
if u.graphics.IsGL() { if u.graphics.IsGL() {
glfw.WindowHint(glfw.ContextVersionMajor, 2) glfw.WindowHint(glfw.ContextVersionMajor, 2)
glfw.WindowHint(glfw.ContextVersionMinor, 1) glfw.WindowHint(glfw.ContextVersionMinor, 1)
@ -682,7 +682,9 @@ func (u *UserInterface) run(width, height int, scale float64, title string, cont
u.reqHeight = h u.reqHeight = h
}) })
return nil return nil
}) }); err != nil {
return err
}
var w uintptr var w uintptr
_ = u.t.Call(func() error { _ = u.t.Call(func() error {