mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
ui: Refactoring
This commit is contained in:
parent
e3ef0540a3
commit
0276be6c69
5
run.go
5
run.go
@ -73,7 +73,10 @@ func Run(f func(*Image) error, width, height int, scale float64, title string) e
|
|||||||
ch := make(chan error)
|
ch := make(chan error)
|
||||||
go func() {
|
go func() {
|
||||||
g := newGraphicsContext(f)
|
g := newGraphicsContext(f)
|
||||||
ch <- loop.Run(g, width, height, scale, title, FPS)
|
if err := loop.Run(g, width, height, scale, title, FPS); err != nil {
|
||||||
|
ch <- err
|
||||||
|
}
|
||||||
|
close(ch)
|
||||||
}()
|
}()
|
||||||
ui.Main()
|
ui.Main()
|
||||||
return <-ch
|
return <-ch
|
||||||
|
Loading…
Reference in New Issue
Block a user