mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +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,
|
||||
}
|
||||
u.window.MakeContextCurrent()
|
||||
glfw.SwapInterval(1)
|
||||
currentUI = u
|
||||
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.
|
||||
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?
|
||||
u.sizeChanged = true
|
||||
return true
|
||||
|
Loading…
Reference in New Issue
Block a user