mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
ui: Bug fix: Fullscreen scale must be recalculated
This commit is contained in:
parent
76da09f74c
commit
af8b5d72c3
@ -378,16 +378,14 @@ func (u *userInterface) setScreenSize(width, height int, scale float64, fullscre
|
||||
u.origPosX, u.origPosY = window.GetPos()
|
||||
window.SetMonitor(m, 0, 0, v.Width, v.Height, v.RefreshRate)
|
||||
} else {
|
||||
x, y := window.GetPos()
|
||||
// Reverted from fullscreen
|
||||
if u.origPosX >= 0 && u.origPosY >= 0 {
|
||||
x = u.origPosX
|
||||
y = u.origPosY
|
||||
x := u.origPosX
|
||||
y := u.origPosY
|
||||
window.SetMonitor(nil, x, y, 16, 16, v.RefreshRate)
|
||||
u.origPosX = -1
|
||||
u.origPosY = -1
|
||||
u.fullscreenScale = 0
|
||||
}
|
||||
// TODO: y must be mirroed on macOS?
|
||||
window.SetMonitor(nil, x, y, 16, 16, v.RefreshRate)
|
||||
ch := make(chan struct{})
|
||||
window.SetFramebufferSizeCallback(func(_ *glfw.Window, width, height int) {
|
||||
window.SetFramebufferSizeCallback(nil)
|
||||
|
Loading…
Reference in New Issue
Block a user