internal/uidriver/glfw: Make SetFullscreen more responsive on macOS

This commit is contained in:
Hajime Hoshi 2021-09-20 21:01:17 +09:00
parent 07c8cb0e23
commit 9dbff2cddd

View File

@ -183,7 +183,7 @@ func (u *UserInterface) isNativeFullscreenAvailable() bool {
func (u *UserInterface) setNativeFullscreen(fullscreen bool) { func (u *UserInterface) setNativeFullscreen(fullscreen bool) {
// Toggling fullscreen might ignore events like keyUp. Ensure that events are fired. // Toggling fullscreen might ignore events like keyUp. Ensure that events are fired.
glfw.WaitEventsTimeout(1) glfw.WaitEventsTimeout(0.1)
C.setNativeFullscreen(C.uintptr_t(u.window.GetCocoaWindow()), C.bool(fullscreen)) C.setNativeFullscreen(C.uintptr_t(u.window.GetCocoaWindow()), C.bool(fullscreen))
} }