Skip to content

Commit

Permalink
ebiten: Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
hajimehoshi committed Aug 4, 2021
1 parent 0bc5166 commit fb04b0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
9 changes: 0 additions & 9 deletions uicontext.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,6 @@ func (c *uiContext) setScreenClearedEveryFrame(cleared bool) {
}
}

func (c *uiContext) setWindowResizable(resizable bool) {
c.m.Lock()
defer c.m.Unlock()

if w := uiDriver().Window(); w != nil {
w.SetResizable(resizable)
}
}

func (c *uiContext) screenScale(deviceScaleFactor float64) float64 {
if c.offscreen == nil {
return 0
Expand Down
4 changes: 3 additions & 1 deletion window.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ func IsWindowResizable() bool {
//
// SetWindowResizable is concurrent-safe.
func SetWindowResizable(resizable bool) {
theUIContext.setWindowResizable(resizable)
if w := uiDriver().Window(); w != nil {
w.SetResizable(resizable)
}
}

// SetWindowTitle sets the title of the window.
Expand Down

0 comments on commit fb04b0d

Please sign in to comment.