mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
internal/ui: make it explicit to call swapBuffers only w/ OpenGL
This commit is contained in:
parent
0e137e8dd7
commit
0a03df297b
@ -1224,8 +1224,10 @@ func (u *userInterfaceImpl) setFullscreen(fullscreen bool) {
|
|||||||
// Adjust the window size later (after adjusting the position).
|
// Adjust the window size later (after adjusting the position).
|
||||||
} else if !u.isNativeFullscreenAvailable() && u.window.GetMonitor() != nil {
|
} else if !u.isNativeFullscreenAvailable() && u.window.GetMonitor() != nil {
|
||||||
u.window.SetMonitor(nil, 0, 0, ww, wh, 0)
|
u.window.SetMonitor(nil, 0, 0, ww, wh, 0)
|
||||||
glfw.PollEvents()
|
if u.graphicsDriver.IsGL() {
|
||||||
u.swapBuffers()
|
glfw.PollEvents()
|
||||||
|
u.swapBuffers()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// glfw.PollEvents is necessary for macOS to enable (*glfw.Window).SetPos and SetSize (#2296).
|
// glfw.PollEvents is necessary for macOS to enable (*glfw.Window).SetPos and SetSize (#2296).
|
||||||
|
Loading…
Reference in New Issue
Block a user