From 8994bf4fad4a9dd91a48902b1cbb17df47c3119b Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Fri, 2 Jan 2015 02:23:47 +0900 Subject: [PATCH] Rename RealScale -> ActualScale --- internal/ui/ui.go | 18 +++++++++--------- run.go | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/internal/ui/ui.go b/internal/ui/ui.go index 3b852a114..ae3245ab5 100644 --- a/internal/ui/ui.go +++ b/internal/ui/ui.go @@ -61,12 +61,12 @@ func init() { } type UI struct { - window *glfw.Window - scale int - realScale int - glContext *opengl.Context - input input - funcs chan func() + window *glfw.Window + scale int + actualScale int + glContext *opengl.Context + input input + funcs chan func() } func New(width, height, scale int, title string) (*UI, error) { @@ -109,13 +109,13 @@ func New(width, height, scale int, title string) (*UI, error) { // For retina displays, recalculate the scale with the framebuffer size. windowWidth, _ := window.GetFramebufferSize() - ui.realScale = windowWidth / width + ui.actualScale = windowWidth / width return ui, err } -func (u *UI) RealScale() int { - return u.realScale +func (u *UI) ActualScale() int { + return u.actualScale } func (u *UI) DoEvents() { diff --git a/run.go b/run.go index 063f75371..424158f29 100644 --- a/run.go +++ b/run.go @@ -38,7 +38,7 @@ func Run(f func(*Image) error, width, height, scale int, title string) error { var graphicsContext *graphicsContext ui.Use(func(c *opengl.Context) { - graphicsContext, err = newGraphicsContext(c, width, height, ui.RealScale()) + graphicsContext, err = newGraphicsContext(c, width, height, ui.ActualScale()) }) if err != nil { return err