mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +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.
|
// RunMainThreadLoop runs the main routine for gomobile-build.
|
||||||
func RunMainThreadLoop(ch <-chan error) error {
|
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)
|
app.Main(appMain)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user