mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
parent
5038b8b645
commit
7018d1aebe
12
internal/processtest/testdata/issue2079.go
vendored
12
internal/processtest/testdata/issue2079.go
vendored
@ -43,17 +43,17 @@ func (g *Game) Layout(width, height int) (int, int) {
|
|||||||
done := make(chan struct{})
|
done := make(chan struct{})
|
||||||
timeout := time.After(time.Second)
|
timeout := time.After(time.Second)
|
||||||
go func() {
|
go func() {
|
||||||
|
i := ebiten.NewImage(width, height)
|
||||||
|
i.Fill(color.White)
|
||||||
|
i.Dispose()
|
||||||
|
close(done)
|
||||||
|
}()
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case <-done:
|
case <-done:
|
||||||
case <-timeout:
|
case <-timeout:
|
||||||
panic("timeout")
|
panic("timeout")
|
||||||
}
|
}
|
||||||
}()
|
|
||||||
defer close(done)
|
|
||||||
|
|
||||||
i := ebiten.NewImage(width, height)
|
|
||||||
i.Fill(color.White)
|
|
||||||
i.Dispose()
|
|
||||||
return width, height
|
return width, height
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user