mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
ui: Add comments
This commit is contained in:
parent
f6c2d899f1
commit
9264e38324
@ -119,9 +119,13 @@ func currentMonitor() *glfw.Monitor {
|
||||
}
|
||||
if w == 0 {
|
||||
// There is no window at launching.
|
||||
// TODO: Use glfw.GetCurrentContext() like currentMonitor() in ui_unix.go.
|
||||
return glfw.GetPrimaryMonitor()
|
||||
}
|
||||
|
||||
// Get the current monitor by the window handle instead of the window position. It is because the window
|
||||
// position is not relaiable in some cases e.g. when the window is put across multiple monitors.
|
||||
|
||||
m, err := monitorFromWindow(w, monitorDefaultToNearest)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
Loading…
Reference in New Issue
Block a user