mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
internal/ui: optimization: reduce u.t.Call
This commit is contained in:
parent
f2860bebed
commit
172da82aa7
@ -501,15 +501,10 @@ func (u *userInterfaceImpl) SetFullscreen(fullscreen bool) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var update bool
|
|
||||||
u.t.Call(func() {
|
u.t.Call(func() {
|
||||||
update = u.isFullscreen() != fullscreen
|
if u.isFullscreen() == fullscreen {
|
||||||
})
|
|
||||||
if !update {
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
u.t.Call(func() {
|
|
||||||
w, h := u.windowWidthInDIP, u.windowHeightInDIP
|
w, h := u.windowWidthInDIP, u.windowHeightInDIP
|
||||||
u.setWindowSizeInDIP(w, h, fullscreen)
|
u.setWindowSizeInDIP(w, h, fullscreen)
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user