mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
internal/ui: refactoring: call updateWindowSizeLimits in createWindow
This commit is contained in:
parent
4c6c31e384
commit
6dbc5ba558
@ -708,6 +708,8 @@ func (u *UserInterface) createWindow() error {
|
||||
u.registerWindowCloseCallback()
|
||||
u.registerWindowFramebufferSizeCallback()
|
||||
|
||||
u.updateWindowSizeLimits()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -906,8 +908,6 @@ func (u *UserInterface) init() error {
|
||||
ww, wh := u.getInitWindowSizeInDIP()
|
||||
u.setWindowSizeInDIP(ww, wh, u.isFullscreen())
|
||||
|
||||
u.updateWindowSizeLimits()
|
||||
|
||||
// Maximizing a window requires a proper size and position. Call Maximize here (#1117).
|
||||
if u.isInitWindowMaximized() {
|
||||
u.window.Maximize()
|
||||
@ -1273,8 +1273,6 @@ func (u *UserInterface) setWindowSizeInDIPImpl(width, height int, fullscreen boo
|
||||
// TODO: This should return an error.
|
||||
panic(fmt.Sprintf("ui: failed to recreate window: %v", err))
|
||||
}
|
||||
// Reset the size limits explicitly.
|
||||
u.updateWindowSizeLimits()
|
||||
u.window.Show()
|
||||
windowRecreated = true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user