mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
internal/uidriver/glfw: refactoring: remove initTitle
This commit is contained in:
parent
5ee2ff56ca
commit
220a8f48ac
@ -86,7 +86,6 @@ type UserInterface struct {
|
||||
initFullscreenWidthInDIP int
|
||||
initFullscreenHeightInDIP int
|
||||
|
||||
initTitle string
|
||||
initFullscreen bool
|
||||
initCursorMode driver.CursorMode
|
||||
initWindowDecorated bool
|
||||
@ -284,19 +283,6 @@ func (u *UserInterface) setWindowSizeLimitsInDIP(minw, minh, maxw, maxh int) boo
|
||||
return true
|
||||
}
|
||||
|
||||
func (u *UserInterface) getInitTitle() string {
|
||||
u.m.RLock()
|
||||
v := u.initTitle
|
||||
u.m.RUnlock()
|
||||
return v
|
||||
}
|
||||
|
||||
func (u *UserInterface) setInitTitle(title string) {
|
||||
u.m.RLock()
|
||||
u.initTitle = title
|
||||
u.m.RUnlock()
|
||||
}
|
||||
|
||||
func (u *UserInterface) isInitFullscreen() bool {
|
||||
u.m.RLock()
|
||||
v := u.initFullscreen
|
||||
@ -927,7 +913,6 @@ func (u *UserInterface) init() error {
|
||||
u.window.Maximize()
|
||||
}
|
||||
|
||||
u.title = u.getInitTitle()
|
||||
u.window.SetTitle(u.title)
|
||||
u.window.Show()
|
||||
|
||||
|
@ -258,7 +258,9 @@ func (w *window) SetIcon(iconImages []image.Image) {
|
||||
|
||||
func (w *window) SetTitle(title string) {
|
||||
if !w.ui.isRunning() {
|
||||
w.ui.setInitTitle(title)
|
||||
w.ui.m.Lock()
|
||||
w.ui.title = title
|
||||
w.ui.m.Unlock()
|
||||
return
|
||||
}
|
||||
w.ui.title = title
|
||||
|
Loading…
Reference in New Issue
Block a user