mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
ui: Bug fix: position was wrong when changing window size
This commit is contained in:
parent
5b6fa2d384
commit
2996f778b6
@ -373,7 +373,9 @@ func (u *userInterface) setScreenSize(width, height int, scale float64, fullscre
|
|||||||
u.origPosX, u.origPosY = window.GetPos()
|
u.origPosX, u.origPosY = window.GetPos()
|
||||||
window.SetMonitor(m, 0, 0, v.Width, v.Height, v.RefreshRate)
|
window.SetMonitor(m, 0, 0, v.Width, v.Height, v.RefreshRate)
|
||||||
} else {
|
} else {
|
||||||
window.SetMonitor(nil, 0, 0, 16, 16, v.RefreshRate)
|
x, y := window.GetPos()
|
||||||
|
// TODO: y must be mirroed on macOS?
|
||||||
|
window.SetMonitor(nil, x, y, 16, 16, v.RefreshRate)
|
||||||
ch := make(chan struct{})
|
ch := make(chan struct{})
|
||||||
window.SetFramebufferSizeCallback(func(_ *glfw.Window, width, height int) {
|
window.SetFramebufferSizeCallback(func(_ *glfw.Window, width, height int) {
|
||||||
window.SetFramebufferSizeCallback(nil)
|
window.SetFramebufferSizeCallback(nil)
|
||||||
|
Loading…
Reference in New Issue
Block a user