mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-12 22:17:26 +01:00
ui: Bug fix: original positions must not be updated during fullscreen mode (#376)
This commit is contained in:
parent
af8b5d72c3
commit
6336b59493
@ -375,7 +375,9 @@ func (u *userInterface) setScreenSize(width, height int, scale float64, fullscre
|
|||||||
m := glfw.GetPrimaryMonitor()
|
m := glfw.GetPrimaryMonitor()
|
||||||
v := m.GetVideoMode()
|
v := m.GetVideoMode()
|
||||||
if u.fullscreen {
|
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)
|
window.SetMonitor(m, 0, 0, v.Width, v.Height, v.RefreshRate)
|
||||||
} else {
|
} else {
|
||||||
if u.origPosX >= 0 && u.origPosY >= 0 {
|
if u.origPosX >= 0 && u.origPosY >= 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user