mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +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
|
||||
y := u.origPosY
|
||||
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.origPosY = -1
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user