mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 20:18:59 +01:00
mobile/ebitenmobileview: refactoring: reduce dependency on the package devicescale
This commit is contained in:
parent
5d5e3c7c0b
commit
5de9c5da61
@ -30,7 +30,6 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/hajimehoshi/ebiten/v2"
|
"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/restorable"
|
||||||
"github.com/hajimehoshi/ebiten/v2/internal/ui"
|
"github.com/hajimehoshi/ebiten/v2/internal/ui"
|
||||||
)
|
)
|
||||||
@ -119,7 +118,7 @@ func OnContextLost() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func DeviceScale() float64 {
|
func DeviceScale() float64 {
|
||||||
return devicescale.GetAt(0, 0)
|
return ui.Get().DeviceScaleFactor()
|
||||||
}
|
}
|
||||||
|
|
||||||
type RenderRequester interface {
|
type RenderRequester interface {
|
||||||
|
Loading…
Reference in New Issue
Block a user