mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
ui: Bug fix: SwapInterval needs to be called after SetMonitor (#357)
This commit is contained in:
parent
ba204c6d3b
commit
7d236950c2
@ -80,7 +80,6 @@ func initialize() error {
|
|||||||
origPosY: -1,
|
origPosY: -1,
|
||||||
}
|
}
|
||||||
u.window.MakeContextCurrent()
|
u.window.MakeContextCurrent()
|
||||||
glfw.SwapInterval(1)
|
|
||||||
currentUI = u
|
currentUI = u
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -445,6 +444,10 @@ func (u *userInterface) setScreenSize(width, height int, scale float64, fullscre
|
|||||||
// Window title might lost on macOS after coming back from fullscreen.
|
// Window title might lost on macOS after coming back from fullscreen.
|
||||||
u.window.SetTitle(u.title)
|
u.window.SetTitle(u.title)
|
||||||
}
|
}
|
||||||
|
// SwapInterval is affected by the current monitor of the window.
|
||||||
|
// This needs to be called at least after SetMonitor.
|
||||||
|
// Without SwapInterval after SetMonitor, vsynch doesn't work (#357).
|
||||||
|
glfw.SwapInterval(1)
|
||||||
// TODO: Rename this variable?
|
// TODO: Rename this variable?
|
||||||
u.sizeChanged = true
|
u.sizeChanged = true
|
||||||
return true
|
return true
|
||||||
|
Loading…
Reference in New Issue
Block a user