mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-13 20:42:07 +01:00
graphics: Bug fix: a too old frame was rendered at least on Android
Fixes #520
This commit is contained in:
parent
1a898dd1b9
commit
deab21fad1
@ -97,7 +97,7 @@ func (c *graphicsContext) Update(afterFrameUpdate func()) error {
|
|||||||
}
|
}
|
||||||
afterFrameUpdate()
|
afterFrameUpdate()
|
||||||
}
|
}
|
||||||
if 0 < updateCount {
|
|
||||||
// Call ClearFramebuffer instead of c.screen.Clear()
|
// Call ClearFramebuffer instead of c.screen.Clear()
|
||||||
// to clear the whole region including fullscreen's padding.
|
// to clear the whole region including fullscreen's padding.
|
||||||
c.screen.restorable.ClearFramebuffer()
|
c.screen.restorable.ClearFramebuffer()
|
||||||
@ -117,7 +117,6 @@ func (c *graphicsContext) Update(afterFrameUpdate func()) error {
|
|||||||
op.CompositeMode = CompositeModeCopy
|
op.CompositeMode = CompositeModeCopy
|
||||||
op.Filter = filterScreen
|
op.Filter = filterScreen
|
||||||
_ = c.screen.DrawImage(c.offscreen, op)
|
_ = c.screen.DrawImage(c.offscreen, op)
|
||||||
}
|
|
||||||
|
|
||||||
if err := restorable.ResolveStaleImages(); err != nil {
|
if err := restorable.ResolveStaleImages(); err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user