From 24fdcdd8e4152384224ff573900c4b0e99ae4fa8 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 8 Apr 2019 23:49:31 -0400 Subject: [PATCH] uidriver: Rename updateGraphics -> updateSize --- internal/uidriver/glfw/ui.go | 6 +++--- internal/uidriver/js/ui.go | 6 +++--- internal/uidriver/mobile/ui.go | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/internal/uidriver/glfw/ui.go b/internal/uidriver/glfw/ui.go index 8fe72a9ae..b1d56cde2 100644 --- a/internal/uidriver/glfw/ui.go +++ b/internal/uidriver/glfw/ui.go @@ -699,7 +699,7 @@ func (u *UserInterface) actualScreenScale() float64 { return u.getScale() * devicescale.GetAt(u.currentMonitor().GetPos()) } -func (u *UserInterface) updateGraphics(context driver.UIContext) { +func (u *UserInterface) updateSize(context driver.UIContext) { actualScale := 0.0 sizeChanged := false // TODO: Is it possible to reduce 'runOnMainThread' calls? @@ -742,7 +742,7 @@ func (u *UserInterface) update(context driver.UIContext) error { }) // This call is needed for initialization. - u.updateGraphics(context) + u.updateSize(context) _ = mainthread.Run(func() error { glfw.PollEvents() @@ -764,7 +764,7 @@ func (u *UserInterface) update(context driver.UIContext) error { }) if err := context.Update(func() { // The offscreens must be updated every frame (#490). - u.updateGraphics(context) + u.updateSize(context) }); err != nil { return err } diff --git a/internal/uidriver/js/ui.go b/internal/uidriver/js/ui.go index 2c5299458..906f4c870 100644 --- a/internal/uidriver/js/ui.go +++ b/internal/uidriver/js/ui.go @@ -188,7 +188,7 @@ func (u *UserInterface) actualScreenScale() float64 { return u.getScale() * devicescale.GetAt(0, 0) } -func (u *UserInterface) updateGraphics() { +func (u *UserInterface) updateSize() { a := u.actualScreenScale() if u.lastActualScale != a { u.updateScreenSize() @@ -213,9 +213,9 @@ func (u *UserInterface) update() error { u.context.ResumeAudio() u.input.UpdateGamepads() - u.updateGraphics() + u.updateSize() if err := u.context.Update(func() { - u.updateGraphics() + u.updateSize() }); err != nil { return err } diff --git a/internal/uidriver/mobile/ui.go b/internal/uidriver/mobile/ui.go index d51463f58..f16abb72a 100644 --- a/internal/uidriver/mobile/ui.go +++ b/internal/uidriver/mobile/ui.go @@ -174,7 +174,7 @@ func (u *UserInterface) Run(width, height int, scale float64, title string, cont } // Force to set the screen size - u.updateGraphics(context) + u.updateSize(context) for { if err := u.update(context); err != nil { return err @@ -193,7 +193,7 @@ func (u *UserInterface) Loop(ch <-chan error) error { return nil } -func (u *UserInterface) updateGraphics(context driver.UIContext) { +func (u *UserInterface) updateSize(context driver.UIContext) { width, height := 0, 0 actualScale := 0.0 @@ -246,7 +246,7 @@ render: }() if err := context.Update(func() { - u.updateGraphics(context) + u.updateSize(context) }); err != nil { return err }