mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +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()
|
opengl.Init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Force to set the screen size
|
||||||
|
u.updateGraphicsContext(g)
|
||||||
for {
|
for {
|
||||||
if err := u.update(g); err != nil {
|
if err := u.update(g); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -205,8 +207,6 @@ func (u *userInterface) update(g GraphicsContext) error {
|
|||||||
renderChEnd <- struct{}{}
|
renderChEnd <- struct{}{}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
u.updateGraphicsContext(g)
|
|
||||||
|
|
||||||
if err := g.Update(func() {
|
if err := g.Update(func() {
|
||||||
u.updateGraphicsContext(g)
|
u.updateGraphicsContext(g)
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user