ui: Bug fix: Don't use integer scale (JavaScript)

This commit is contained in:
Hajime Hoshi 2016-07-09 18:27:19 +09:00
parent 76f694b948
commit 193c03ea58

View File

@ -294,13 +294,13 @@ func (u *userInterface) Start(width, height int, scale float64, title string) er
} }
func (u *userInterface) size() (width, height int) { func (u *userInterface) size() (width, height int) {
a := int(u.ActualScreenScale()) a := u.ActualScreenScale()
if a == 0 { if a == 0 {
// a == 0 only on the initial state. // a == 0 only on the initial state.
return return
} }
width = canvas.Get("width").Int() / a width = int(canvas.Get("width").Float() / a)
height = canvas.Get("height").Int() / a height = int(canvas.Get("height").Float() / a)
return return
} }