mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
ui: Bug fix: Stop the loop of window-size recalculation
This commit is contained in:
parent
09ea15e0ff
commit
ba0279ebe3
@ -154,7 +154,10 @@ func (c *uiContext) updateOffscreen() {
|
|||||||
c.screen = newScreenFramebufferImage(int(c.outsideWidth*d), int(c.outsideHeight*d))
|
c.screen = newScreenFramebufferImage(int(c.outsideWidth*d), int(c.outsideHeight*d))
|
||||||
|
|
||||||
if uiDriver().CanHaveWindow() && !uiDriver().IsFullscreen() {
|
if uiDriver().CanHaveWindow() && !uiDriver().IsFullscreen() {
|
||||||
c.setScaleForWindow(c.screenScale() / d)
|
// TODO: Update the scale for window. In the current implementation, this can cause an infinite loop:
|
||||||
|
// e.g., when the size is 854 and the scale is 0.75, the calculated outside size is 640.5. This is
|
||||||
|
// rounded to 640, and then the scale is updated.
|
||||||
|
// c.setScaleForWindow(c.screenScale() / d)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user