mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
internal/ui: refactoring: simplify initializing fullscreen
This commit is contained in:
parent
6167cc4f54
commit
98076bd512
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user