mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
ui: Bug fix: Don't use integer scale (JavaScript)
This commit is contained in:
parent
76f694b948
commit
193c03ea58
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user