mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
devicescale: Use devicePixelRatio property for go2cpp
This commit is contained in:
parent
903cc37ab4
commit
2106e0fa6a
@ -19,6 +19,10 @@ import (
|
||||
)
|
||||
|
||||
func impl(x, y int) float64 {
|
||||
if go2cpp := js.Global().Get("go2cpp"); go2cpp.Truthy() {
|
||||
return go2cpp.Get("devicePixelRatio").Float()
|
||||
}
|
||||
|
||||
window := js.Global().Get("window")
|
||||
if !window.Truthy() {
|
||||
return 1
|
||||
|
Loading…
Reference in New Issue
Block a user