mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
internal/ui: refactoring: adjust the width earlier
This commit is contained in:
parent
c7deed6e72
commit
f0dbf86799
@ -1241,8 +1241,8 @@ func (u *userInterfaceImpl) setWindowSizeInDIP(width, height int) {
|
||||
}
|
||||
|
||||
width, height = u.adjustWindowSizeBasedOnSizeLimitsInDIP(width, height)
|
||||
if width < 1 {
|
||||
width = 1
|
||||
if m := u.minimumWindowWidth(); width < m {
|
||||
width = m
|
||||
}
|
||||
if height < 1 {
|
||||
height = 1
|
||||
@ -1335,10 +1335,6 @@ func (u *userInterfaceImpl) setWindowSizeInDIPImpl(width, height int, fullscreen
|
||||
// Get the original window position and size before changing the state of fullscreen.
|
||||
origX, origY := u.origWindowPos()
|
||||
|
||||
if mw := u.minimumWindowWidth(); width < mw {
|
||||
width = mw
|
||||
}
|
||||
|
||||
wasFullscreen := u.isFullscreen()
|
||||
if u.isNativeFullscreenAvailable() && u.isNativeFullscreen() {
|
||||
u.setNativeFullscreen(false)
|
||||
|
Loading…
Reference in New Issue
Block a user