mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58: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
|
||||
return false
|
||||
}
|
||||
u.width = width
|
||||
u.height = height
|
||||
if u.width != width || u.height != height {
|
||||
u.width = width
|
||||
u.height = height
|
||||
u.fullscreenScale = 0
|
||||
}
|
||||
|
||||
// To make sure the current existing framebuffers are rendered,
|
||||
// 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)
|
||||
u.origPosX = -1
|
||||
u.origPosY = -1
|
||||
u.fullscreenScale = 0
|
||||
}
|
||||
ch := make(chan struct{})
|
||||
window.SetFramebufferSizeCallback(func(_ *glfw.Window, width, height int) {
|
||||
|
Loading…
Reference in New Issue
Block a user