mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
mobile: Refactoring
This commit is contained in:
parent
bbe6926f9c
commit
d88d1be4ad
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user