From ba0279ebe3bf747a6740f80e111848416854c93a Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Fri, 20 Dec 2019 01:56:27 +0900 Subject: [PATCH] ui: Bug fix: Stop the loop of window-size recalculation --- uicontext.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/uicontext.go b/uicontext.go index 3558e15fb..77bb8f39d 100644 --- a/uicontext.go +++ b/uicontext.go @@ -154,7 +154,10 @@ func (c *uiContext) updateOffscreen() { c.screen = newScreenFramebufferImage(int(c.outsideWidth*d), int(c.outsideHeight*d)) 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) } }