mobile/ebitenmobileview: refactoring: reduce dependency on the package devicescale

This commit is contained in:
Hajime Hoshi 2023-09-24 02:47:25 +09:00
parent 5d5e3c7c0b
commit 5de9c5da61

View File

@ -30,7 +30,6 @@ import (
"sync"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/internal/devicescale"
"github.com/hajimehoshi/ebiten/v2/internal/restorable"
"github.com/hajimehoshi/ebiten/v2/internal/ui"
)
@ -119,7 +118,7 @@ func OnContextLost() {
}
func DeviceScale() float64 {
return devicescale.GetAt(0, 0)
return ui.Get().DeviceScaleFactor()
}
type RenderRequester interface {