mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-02-02 22:14:29 +01:00
internal/ui: bug fix: skipCount should be reset when the outside size changes
Closes #3101
This commit is contained in:
parent
d30908522a
commit
50f0a8343c
@ -246,8 +246,13 @@ func (c *context) layoutGame(outsideWidth, outsideHeight float64, deviceScaleFac
|
||||
panic("ui: Layout must return positive numbers")
|
||||
}
|
||||
|
||||
c.screenWidth = outsideWidth * deviceScaleFactor
|
||||
c.screenHeight = outsideHeight * deviceScaleFactor
|
||||
screenWidth := outsideWidth * deviceScaleFactor
|
||||
screenHeight := outsideHeight * deviceScaleFactor
|
||||
if c.screenWidth != screenWidth || c.screenHeight != screenHeight {
|
||||
c.skipCount = 0
|
||||
}
|
||||
c.screenWidth = screenWidth
|
||||
c.screenHeight = screenHeight
|
||||
c.offscreenWidth = owf
|
||||
c.offscreenHeight = ohf
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user