graphics: Don't update the screen when not necessary

This commit is contained in:
Hajime Hoshi 2018-01-07 03:13:13 +09:00
parent 0469ef386b
commit b62df75e36

View File

@ -118,9 +118,9 @@ func (c *graphicsContext) Update(afterFrameUpdate func()) error {
}
if 0 < updateCount {
drawWithFittingScale(c.offscreen2, c.offscreen)
}
_ = c.screen.Clear()
drawWithFittingScale(c.screen, c.offscreen2)
}
if err := restorable.ResolveStaleImages(); err != nil {
return err