mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
ui: Bug fix: Call SetPos multiple times to render correctly (#703)
This commit is contained in:
parent
e0d2d5e753
commit
fb7a3f2736
@ -742,6 +742,12 @@ func (u *userInterface) forceSetScreenSize(width, height int, scale float64, ful
|
|||||||
x := u.origPosX
|
x := u.origPosX
|
||||||
y := u.origPosY
|
y := u.origPosY
|
||||||
u.window.SetPos(x, y)
|
u.window.SetPos(x, y)
|
||||||
|
// Dirty hack for macOS (#703). Rendering doesn't work correctly with one SetPos, but work
|
||||||
|
// with two or more SetPos.
|
||||||
|
if runtime.GOOS == "darwin" {
|
||||||
|
u.window.SetPos(x+1, y)
|
||||||
|
u.window.SetPos(x, y)
|
||||||
|
}
|
||||||
u.origPosX = -1
|
u.origPosX = -1
|
||||||
u.origPosY = -1
|
u.origPosY = -1
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user