mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
Revert "ebiten: Skip calling Draw when the update count is 0"
This reverts commit 4d545b9ad8
.
Reason: Restricting calls of Draw was counter-intuitive for users.
See the discussion at #1486
This commit is contained in:
parent
9806bb2c5e
commit
0b30ed5959
@ -190,12 +190,13 @@ func (c *uiContext) update(updateCount int) error {
|
||||
uiDriver().ResetForFrame()
|
||||
}
|
||||
|
||||
if updateCount > 0 {
|
||||
// Even though updateCount == 0, the offscreen is cleared and Draw is called.
|
||||
// Draw should not update the game state and then the screen should not be updated without Update, but
|
||||
// users might want to process something at Draw with the time intervals of FPS.
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user