ui: Bug fix: original positions must not be updated during fullscreen mode (#376)

This commit is contained in:
Hajime Hoshi 2017-06-30 10:48:18 +09:00
parent af8b5d72c3
commit 6336b59493

View File

@ -375,7 +375,9 @@ func (u *userInterface) setScreenSize(width, height int, scale float64, fullscre
m := glfw.GetPrimaryMonitor()
v := m.GetVideoMode()
if u.fullscreen {
u.origPosX, u.origPosY = window.GetPos()
if u.origPosX < 0 && u.origPosY < 0 {
u.origPosX, u.origPosY = window.GetPos()
}
window.SetMonitor(m, 0, 0, v.Width, v.Height, v.RefreshRate)
} else {
if u.origPosX >= 0 && u.origPosY >= 0 {