diff --git a/graphicscontext.go b/graphicscontext.go index b71dc305e..2671ed893 100644 --- a/graphicscontext.go +++ b/graphicscontext.go @@ -54,15 +54,13 @@ func (c *graphicsContext) SetSize(screenWidth, screenHeight int, screenScale flo if c.offscreen != nil { _ = c.offscreen.Dispose() } - offscreen := newVolatileImage(screenWidth, screenHeight, FilterDefault) + c.offscreen = newVolatileImage(screenWidth, screenHeight, FilterDefault) w := int(float64(screenWidth) * screenScale) h := int(float64(screenHeight) * screenScale) px0, py0, _, _ := ui.ScreenPadding() c.screen = newImageWithScreenFramebuffer(w, h) - c.offscreen = offscreen - c.offsetX = px0 c.offsetY = py0 }