mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-23 09:22:01 +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)
|
||||
go func() {
|
||||
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()
|
||||
return <-ch
|
||||
|
Loading…
Reference in New Issue
Block a user