mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
ui: Bug fix: exit update function once when the context is lost (#526)
This commit is contained in:
parent
dada2e060a
commit
4c1cc9e699
@ -137,7 +137,12 @@ func (u *userInterface) update(g GraphicsContext) error {
|
||||
if opengl.GetContext().IsContextLost() {
|
||||
opengl.GetContext().RestoreContext()
|
||||
g.Invalidate()
|
||||
|
||||
// Need to return once to wait restored (#526)
|
||||
// TODO: Is it necessary to handle webglcontextrestored event?
|
||||
return nil
|
||||
}
|
||||
|
||||
currentInput.updateGamepads()
|
||||
u.updateGraphicsContext(g)
|
||||
if err := g.Update(func() {
|
||||
|
Loading…
Reference in New Issue
Block a user