mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
Reland: graphics: Use math.Ceil for the screen framebuffer size (#622)
This is reland of0b60471ac0
. I thought this didn't take any effect, but I confirmed this actually fixed (part of) the blinking-line problem on Xperia XZ. This fixes the upper side thin line. I'm not sure this fixes the lower side thin line, which is reported but I couldn't reproduce. I expect this ande829e650f2
will fix the reported problem, and I am going to confirm this.
This commit is contained in:
parent
b5ee209e0b
commit
18daa04173
@ -64,8 +64,8 @@ func (c *graphicsContext) SetSize(screenWidth, screenHeight int, screenScale flo
|
||||
}
|
||||
c.offscreen = newVolatileImage(screenWidth, screenHeight)
|
||||
|
||||
w := int(float64(screenWidth) * screenScale)
|
||||
h := int(float64(screenHeight) * screenScale)
|
||||
w := int(math.Ceil(float64(screenWidth) * screenScale))
|
||||
h := int(math.Ceil(float64(screenHeight) * screenScale))
|
||||
px0, py0, px1, py1 := ui.ScreenPadding()
|
||||
c.screen = newImageWithScreenFramebuffer(w+int(math.Ceil(px0+px1)), h+int(math.Ceil(py0+py1)))
|
||||
c.screenWidth = w
|
||||
|
Loading…
Reference in New Issue
Block a user