diff --git a/internal/ui/ui_glfw.go b/internal/ui/ui_glfw.go index f34274d98..20ba44dfe 100644 --- a/internal/ui/ui_glfw.go +++ b/internal/ui/ui_glfw.go @@ -174,19 +174,6 @@ func SetScreenScale(scale float64) bool { return r } -func SetFullscreen(fullscreen bool) { - u := currentUI - if !u.isRunning() { - u.setInitFullscreen(fullscreen) - return - } - _ = u.runOnMainThread(func() error { - u := currentUI - u.setScreenSize(u.width, u.height, u.scale, fullscreen) - return nil - }) -} - func ScreenScale() float64 { u := currentUI if !u.isRunning() { @@ -213,6 +200,19 @@ func IsFullscreen() bool { return f } +func SetFullscreen(fullscreen bool) { + u := currentUI + if !u.isRunning() { + u.setInitFullscreen(fullscreen) + return + } + _ = u.runOnMainThread(func() error { + u := currentUI + u.setScreenSize(u.width, u.height, u.scale, fullscreen) + return nil + }) +} + func ScreenOffset() (float64, float64) { u := currentUI if !u.isRunning() {