mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +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