mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
internal/ui: refactoring: delay the call of outsideSize()
This commit is contained in:
parent
7eff5cbd4a
commit
2ab255dd1c
@ -1056,9 +1056,7 @@ func (u *userInterfaceImpl) update() (float64, float64, error) {
|
|||||||
// The vsync state might be changed in other places (e.g., the SetSizeCallback).
|
// The vsync state might be changed in other places (e.g., the SetSizeCallback).
|
||||||
// Also, when toggling to fullscreen, vsync state might be reset unexpectedly (#1787).
|
// Also, when toggling to fullscreen, vsync state might be reset unexpectedly (#1787).
|
||||||
u.updateVsync()
|
u.updateVsync()
|
||||||
|
|
||||||
u.updateSize()
|
u.updateSize()
|
||||||
outsideWidth, outsideHeight := u.outsideSize()
|
|
||||||
|
|
||||||
if u.fpsMode != FPSModeVsyncOffMinimum {
|
if u.fpsMode != FPSModeVsyncOffMinimum {
|
||||||
// TODO: Updating the input can be skipped when clock.Update returns 0 (#1367).
|
// TODO: Updating the input can be skipped when clock.Update returns 0 (#1367).
|
||||||
@ -1082,6 +1080,7 @@ func (u *userInterfaceImpl) update() (float64, float64, error) {
|
|||||||
return 0, 0, err
|
return 0, 0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
outsideWidth, outsideHeight := u.outsideSize()
|
||||||
return outsideWidth, outsideHeight, nil
|
return outsideWidth, outsideHeight, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user