mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
ui: Refactoring
This commit is contained in:
parent
cefa86ce13
commit
68fbf59720
@ -289,15 +289,17 @@ func (u *userInterface) update(g GraphicsContext) error {
|
||||
}
|
||||
|
||||
actualScale := 0.0
|
||||
sizeChanged := false
|
||||
_ = u.runOnMainThread(func() error {
|
||||
if !u.sizeChanged {
|
||||
return nil
|
||||
}
|
||||
u.sizeChanged = false
|
||||
actualScale = u.actualScreenScale()
|
||||
sizeChanged = true
|
||||
return nil
|
||||
})
|
||||
if 0 < actualScale {
|
||||
if sizeChanged {
|
||||
g.SetSize(u.width, u.height, actualScale)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user