mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
internal/ui: bug fix: do not call PollEvents on Windows and Linux
Updates #2296
This commit is contained in:
parent
568e98ef1c
commit
90accfba1e
@ -1514,7 +1514,10 @@ func (u *userInterfaceImpl) setFullscreen(fullscreen bool) {
|
||||
}
|
||||
|
||||
// glfw.PollEvents is necessary for macOS to enable (*glfw.Window).SetPos and SetSize (#2296).
|
||||
glfw.PollEvents()
|
||||
// This polling causes issues on Linux and Windows when rapidly toggling fullscreen, so we only run it under macOS.
|
||||
if runtime.GOOS == "darwin" {
|
||||
glfw.PollEvents()
|
||||
}
|
||||
|
||||
if origX != invalidPos && origY != invalidPos {
|
||||
u.window.SetPos(origX, origY)
|
||||
|
Loading…
Reference in New Issue
Block a user