mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-11-03 00:24:13 +08:00
@@ -19,7 +19,11 @@ import (
|
||||
)
|
||||
|
||||
func impl(x, y int) float64 {
|
||||
ratio := js.Global().Get("window").Get("devicePixelRatio").Float()
|
||||
window := js.Global().Get("window")
|
||||
if !window.Truthy() {
|
||||
return 1
|
||||
}
|
||||
ratio := window.Get("devicePixelRatio").Float()
|
||||
if ratio == 0 {
|
||||
ratio = 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user