mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
internal/uidriver/glfw: Refactoring
This commit is contained in:
parent
a0be4a302c
commit
23566a7d2e
@ -186,10 +186,12 @@ func initialize() error {
|
||||
}
|
||||
defer w.Destroy()
|
||||
|
||||
// TODO: The first current monitor should be determined without a window.
|
||||
// On Linux, the first window position is always (0, 0) and not reliable to detect a monitor.
|
||||
m := currentMonitor(w)
|
||||
theUI.initMonitor = m
|
||||
v := m.GetVideoMode()
|
||||
scale := videoModeScale(currentMonitor(w))
|
||||
scale := videoModeScale(m)
|
||||
theUI.initFullscreenWidthInDP = int(theUI.fromGLFWMonitorPixel(float64(v.Width), scale))
|
||||
theUI.initFullscreenHeightInDP = int(theUI.fromGLFWMonitorPixel(float64(v.Height), scale))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user