mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 11:48:55 +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 {
|
func impl(x, y int) float64 {
|
||||||
|
if go2cpp := js.Global().Get("go2cpp"); go2cpp.Truthy() {
|
||||||
|
return go2cpp.Get("devicePixelRatio").Float()
|
||||||
|
}
|
||||||
|
|
||||||
window := js.Global().Get("window")
|
window := js.Global().Get("window")
|
||||||
if !window.Truthy() {
|
if !window.Truthy() {
|
||||||
return 1
|
return 1
|
||||||
|
Loading…
Reference in New Issue
Block a user