mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
ebiten: Skip calling Draw when the update count is 0
This commit is contained in:
parent
5d7a098679
commit
4d545b9ad8
@ -176,10 +176,12 @@ func (c *uiContext) update() error {
|
|||||||
|
|
||||||
c.updateOffscreen()
|
c.updateOffscreen()
|
||||||
|
|
||||||
if IsScreenClearedEveryFrame() {
|
if updateCount > 0 {
|
||||||
c.offscreen.Clear()
|
if IsScreenClearedEveryFrame() {
|
||||||
|
c.offscreen.Clear()
|
||||||
|
}
|
||||||
|
c.game.Draw(c.offscreen)
|
||||||
}
|
}
|
||||||
c.game.Draw(c.offscreen)
|
|
||||||
|
|
||||||
// This clear is needed for fullscreen mode or some mobile platforms (#622).
|
// This clear is needed for fullscreen mode or some mobile platforms (#622).
|
||||||
c.screen.Clear()
|
c.screen.Clear()
|
||||||
|
Loading…
Reference in New Issue
Block a user