mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
ui: Panic when error is found on mobile
This commit is contained in:
parent
2d3c6ab5b8
commit
899f007fd0
@ -150,7 +150,12 @@ func Run(width, height int, scale float64, title string, g GraphicsContext, main
|
||||
|
||||
// RunMainThreadLoop runs the main routine for gomobile-build.
|
||||
func RunMainThreadLoop(ch <-chan error) error {
|
||||
// TODO: ch should be used
|
||||
go func() {
|
||||
// As mobile apps never ends, RunMainThreadLoop can't return.
|
||||
// Just panic here.
|
||||
err := <-ch
|
||||
panic(err)
|
||||
}()
|
||||
app.Main(appMain)
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user