ebiten: Skip calling Draw when the update count is 0

This commit is contained in:
Hajime Hoshi 2020-11-27 00:20:27 +09:00
parent 5d7a098679
commit 4d545b9ad8

View File

@ -176,10 +176,12 @@ func (c *uiContext) update() error {
c.updateOffscreen()
if updateCount > 0 {
if IsScreenClearedEveryFrame() {
c.offscreen.Clear()
}
c.game.Draw(c.offscreen)
}
// This clear is needed for fullscreen mode or some mobile platforms (#622).
c.screen.Clear()