mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
ui: Reset framebuffer-size-changed callback after calling (#70)
This commit is contained in:
parent
23b3f1afce
commit
a1aed91cf9
@ -95,6 +95,7 @@ func (u *userInterface) start(width, height, scale int, title string) (actualSca
|
|||||||
ch := make(chan struct{})
|
ch := make(chan struct{})
|
||||||
window := u.window
|
window := u.window
|
||||||
window.SetFramebufferSizeCallback(func(w *glfw.Window, width, height int) {
|
window.SetFramebufferSizeCallback(func(w *glfw.Window, width, height int) {
|
||||||
|
window.SetFramebufferSizeCallback(nil)
|
||||||
close(ch)
|
close(ch)
|
||||||
})
|
})
|
||||||
window.SetSize(width*scale, height*scale)
|
window.SetSize(width*scale, height*scale)
|
||||||
|
Loading…
Reference in New Issue
Block a user