From 193c03ea584e672a53b4279dccb7b35b27993cb7 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 9 Jul 2016 18:27:19 +0900 Subject: [PATCH] ui: Bug fix: Don't use integer scale (JavaScript) --- internal/ui/ui_js.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/ui/ui_js.go b/internal/ui/ui_js.go index 7a634f02a..a86c39505 100644 --- a/internal/ui/ui_js.go +++ b/internal/ui/ui_js.go @@ -294,13 +294,13 @@ func (u *userInterface) Start(width, height int, scale float64, title string) er } func (u *userInterface) size() (width, height int) { - a := int(u.ActualScreenScale()) + a := u.ActualScreenScale() if a == 0 { // a == 0 only on the initial state. return } - width = canvas.Get("width").Int() / a - height = canvas.Get("height").Int() / a + width = int(canvas.Get("width").Float() / a) + height = int(canvas.Get("height").Float() / a) return }