mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
ui: MonitorSize should return the 'current' monitor size instead of the primary monitor size
This commit is contained in:
parent
f3b7148564
commit
4a5548a4a0
@ -240,7 +240,7 @@ func MonitorSize() (int, int) {
|
||||
return nil
|
||||
})
|
||||
} else {
|
||||
v = glfw.GetPrimaryMonitor().GetVideoMode()
|
||||
v = currentMonitor().GetVideoMode()
|
||||
}
|
||||
return v.Width, v.Height
|
||||
}
|
||||
|
2
run.go
2
run.go
@ -317,8 +317,6 @@ func RunWithoutMainLoop(f func(*Image) error, width, height int, scale float64,
|
||||
|
||||
// MonitorSize returns the monitor size in device-independent pixels.
|
||||
// The adopted monitor is the 'current' monitor that includes the biggest area of the window.
|
||||
// However, if the window doesn't exist, MonitorSize returns the 'primary' monitor,
|
||||
// where the taskbar exists on Windows for example.
|
||||
//
|
||||
// On browsers, MonitorSize returns the 'window' size, not 'screen' size since an Ebiten game
|
||||
// should not know the outside of the window object.
|
||||
|
Loading…
Reference in New Issue
Block a user