mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 20:18:59 +01:00
ebiten: Refactoring
This commit is contained in:
parent
0bc5166a36
commit
fb04b0d004
@ -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 {
|
func (c *uiContext) screenScale(deviceScaleFactor float64) float64 {
|
||||||
if c.offscreen == nil {
|
if c.offscreen == nil {
|
||||||
return 0
|
return 0
|
||||||
|
@ -75,7 +75,9 @@ func IsWindowResizable() bool {
|
|||||||
//
|
//
|
||||||
// SetWindowResizable is concurrent-safe.
|
// SetWindowResizable is concurrent-safe.
|
||||||
func SetWindowResizable(resizable bool) {
|
func SetWindowResizable(resizable bool) {
|
||||||
theUIContext.setWindowResizable(resizable)
|
if w := uiDriver().Window(); w != nil {
|
||||||
|
w.SetResizable(resizable)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetWindowTitle sets the title of the window.
|
// SetWindowTitle sets the title of the window.
|
||||||
|
Loading…
Reference in New Issue
Block a user