mobile: Refactoring

This commit is contained in:
Hajime Hoshi 2018-05-26 22:50:58 +09:00
parent bbe6926f9c
commit d88d1be4ad

View File

@ -141,6 +141,8 @@ func Run(width, height int, scale float64, title string, g GraphicsContext, main
opengl.Init()
}
// Force to set the screen size
u.updateGraphicsContext(g)
for {
if err := u.update(g); err != nil {
return err
@ -205,8 +207,6 @@ func (u *userInterface) update(g GraphicsContext) error {
renderChEnd <- struct{}{}
}()
u.updateGraphicsContext(g)
if err := g.Update(func() {
u.updateGraphicsContext(g)
}); err != nil {