mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 02:42:02 +01:00
ui: Bug fix: The window must be shown on the current monitor (#829)
This commit is contained in:
parent
d4a522d9da
commit
ba59cdbc5f
@ -639,7 +639,10 @@ func Run(width, height int, scale float64, title string, g GraphicsContext, main
|
|||||||
|
|
||||||
x := mx + (v.Width-w)/2
|
x := mx + (v.Width-w)/2
|
||||||
y := my + (v.Height-h)/3
|
y := my + (v.Height-h)/3
|
||||||
|
// Adjusting the position is needed only when the monitor is primary. (#829)
|
||||||
|
if mx == 0 && my == 0 {
|
||||||
x, y = adjustWindowPosition(x, y)
|
x, y = adjustWindowPosition(x, y)
|
||||||
|
}
|
||||||
u.window.SetPos(x, y)
|
u.window.SetPos(x, y)
|
||||||
|
|
||||||
u.window.SetSizeCallback(func(_ *glfw.Window, width, height int) {
|
u.window.SetSizeCallback(func(_ *glfw.Window, width, height int) {
|
||||||
|
Loading…
Reference in New Issue
Block a user