mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
ui: Fullscreen scale can be recalculated during fullscreen mode
This commit is contained in:
parent
6336b59493
commit
cefa86ce13
@ -362,8 +362,11 @@ func (u *userInterface) setScreenSize(width, height int, scale float64, fullscre
|
|||||||
u.scale = origScale
|
u.scale = origScale
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
u.width = width
|
if u.width != width || u.height != height {
|
||||||
u.height = height
|
u.width = width
|
||||||
|
u.height = height
|
||||||
|
u.fullscreenScale = 0
|
||||||
|
}
|
||||||
|
|
||||||
// To make sure the current existing framebuffers are rendered,
|
// To make sure the current existing framebuffers are rendered,
|
||||||
// swap buffers here before SetSize is called.
|
// swap buffers here before SetSize is called.
|
||||||
@ -386,7 +389,6 @@ func (u *userInterface) setScreenSize(width, height int, scale float64, fullscre
|
|||||||
window.SetMonitor(nil, x, y, 16, 16, v.RefreshRate)
|
window.SetMonitor(nil, x, y, 16, 16, v.RefreshRate)
|
||||||
u.origPosX = -1
|
u.origPosX = -1
|
||||||
u.origPosY = -1
|
u.origPosY = -1
|
||||||
u.fullscreenScale = 0
|
|
||||||
}
|
}
|
||||||
ch := make(chan struct{})
|
ch := make(chan struct{})
|
||||||
window.SetFramebufferSizeCallback(func(_ *glfw.Window, width, height int) {
|
window.SetFramebufferSizeCallback(func(_ *glfw.Window, width, height int) {
|
||||||
|
Loading…
Reference in New Issue
Block a user