ui: Bug fix: Stop the loop of window-size recalculation

This commit is contained in:
Hajime Hoshi 2019-12-20 01:56:27 +09:00
parent 09ea15e0ff
commit ba0279ebe3

View File

@ -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)
} }
} }