internal/uidriver/glfw/ui.go
func (u *UserInterface) getScale() float64 {
	if !u.isFullscreen() {
		return u.scale
	}
	if u.fullscreenScale == 0 {
		v := u.window.GetMonitor().GetVideoMode()
		sw := float64(v.Width) / u.glfwScale() / float64(u.width)
		sh := float64(v.Height) / u.glfwScale() / float64(u.height)
		s := sw
		if s > sh {
			s = sh
		}
		u.fullscreenScale = s
	}
	return u.fullscreenScale
}
func (u *UserInterface) getScale() float64 {
	if !u.isFullscreen() {
		return u.scale
	}
	if u.fullscreenScale == 0 {
		v := u.window.GetMonitor().GetVideoMode()
		sw := float64(v.Width) / u.glfwScale() / float64(u.width)
		sh := float64(v.Height) / u.glfwScale() / float64(u.height)
		s := sw
		if s > sh {
			s = sh
		}
		u.fullscreenScale = s
	}
	return u.fullscreenScale
}
// getScale must be called from the main thread.