mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
ui: Don't call devicescale.DeviceScale too often
This commit is contained in:
parent
11d23bafa9
commit
10b49bb0a3
@ -27,12 +27,9 @@ package ui
|
|||||||
// }
|
// }
|
||||||
import "C"
|
import "C"
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/hajimehoshi/ebiten/internal/devicescale"
|
|
||||||
)
|
|
||||||
|
|
||||||
func glfwScale() float64 {
|
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) {
|
func adjustWindowPosition(x, y int) (int, int) {
|
||||||
|
Loading…
Reference in New Issue
Block a user