mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
ui: Rename Run -> RunMainThreadLoop
This commit is contained in:
parent
6164ecb9fc
commit
f204c14f90
@ -76,7 +76,7 @@ func initialize() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Run(ch <-chan error) error {
|
func RunMainThreadLoop(ch <-chan error) error {
|
||||||
// TODO: Check this is done on the main thread.
|
// TODO: Check this is done on the main thread.
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
|
@ -258,7 +258,7 @@ func devicePixelRatio() float64 {
|
|||||||
return ratio
|
return ratio
|
||||||
}
|
}
|
||||||
|
|
||||||
func Run(ch <-chan error) error {
|
func RunMainThreadLoop(ch <-chan error) error {
|
||||||
return <-ch
|
return <-ch
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ import (
|
|||||||
"github.com/hajimehoshi/ebiten/internal/graphics/opengl"
|
"github.com/hajimehoshi/ebiten/internal/graphics/opengl"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Run(ch <-chan error) error {
|
func RunMainThreadLoop(ch <-chan error) error {
|
||||||
return errors.New("ui: don't call this: use RunWithoutMainLoop instead of Run")
|
return errors.New("ui: don't call this: use RunWithoutMainLoop instead of Run")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
run.go
2
run.go
@ -82,7 +82,7 @@ func Run(f func(*Image) error, width, height int, scale float64, title string) e
|
|||||||
close(ch)
|
close(ch)
|
||||||
}()
|
}()
|
||||||
// TODO: Use context in Go 1.7?
|
// TODO: Use context in Go 1.7?
|
||||||
if err := ui.Run(ch); err != nil {
|
if err := ui.RunMainThreadLoop(ch); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user