mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 02:42:02 +01:00
internal/ui: bug fix: a wrong monitor was used at setWindowPositionInDIP
This commit is contained in:
parent
9f581327fa
commit
cd2ef6771a
@ -1565,8 +1565,8 @@ func (u *UserInterface) setWindowPositionInDIP(x, y int, monitor *glfw.Monitor)
|
|||||||
// before the fullscreen, while window.GetSize() returns the desktop screen size in the fullscreen mode.
|
// before the fullscreen, while window.GetSize() returns the desktop screen size in the fullscreen mode.
|
||||||
if !u.isFullscreen() && runtime.GOOS == "darwin" {
|
if !u.isFullscreen() && runtime.GOOS == "darwin" {
|
||||||
w, h := u.window.GetSize()
|
w, h := u.window.GetSize()
|
||||||
ww := int(u.dipFromGLFWPixel(float64(w), u.currentMonitor()))
|
ww := int(u.dipFromGLFWPixel(float64(w), monitor))
|
||||||
wh := int(u.dipFromGLFWPixel(float64(h), u.currentMonitor()))
|
wh := int(u.dipFromGLFWPixel(float64(h), monitor))
|
||||||
u.setWindowSizeInDIP(ww, wh, u.isFullscreen())
|
u.setWindowSizeInDIP(ww, wh, u.isFullscreen())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user