diff --git a/internal/ui/ui_windows.go b/internal/ui/ui_windows.go index 02cc2669a..07be0802d 100644 --- a/internal/ui/ui_windows.go +++ b/internal/ui/ui_windows.go @@ -27,12 +27,9 @@ package ui // } import "C" -import ( - "github.com/hajimehoshi/ebiten/internal/devicescale" -) - func glfwScale() float64 { - return devicescale.DeviceScale() + // This function must be called on the main thread. + return currentUI.deviceScale.Get() } func adjustWindowPosition(x, y int) (int, int) {