internal/ui: refactoring: simplify initializing fullscreen

This commit is contained in:
Hajime Hoshi 2022-09-25 18:28:57 +09:00
parent 6167cc4f54
commit 98076bd512

View File

@ -1035,10 +1035,7 @@ func (u *userInterfaceImpl) update() (float64, float64, error) {
}
if u.isInitFullscreen() {
w, h := u.window.GetSize()
ww := int(u.dipFromGLFWPixel(float64(w), u.currentMonitor()))
wh := int(u.dipFromGLFWPixel(float64(h), u.currentMonitor()))
u.setWindowSizeInDIP(ww, wh, true)
u.setWindowSizeInDIP(u.origWindowWidthInDIP, u.origWindowHeightInDIP, true)
u.setInitFullscreen(false)
}