examples/flappy: Should use fullscreen on Wasm

This commit is contained in:
Hajime Hoshi 2018-10-14 01:21:13 +09:00
parent 56541a8c0a
commit 13174cdb22

View File

@ -398,7 +398,7 @@ func main() {
g := NewGame() g := NewGame()
// On browsers, let's use fullscreen so that this is playable on any browsers. // On browsers, let's use fullscreen so that this is playable on any browsers.
// It is planned to ignore the given 'scale' apply fullscreen automatically on browsers (#571). // It is planned to ignore the given 'scale' apply fullscreen automatically on browsers (#571).
if runtime.GOARCH == "js" { if runtime.GOARCH == "js" || runtime.GOOS == "js" {
ebiten.SetFullscreen(true) ebiten.SetFullscreen(true)
} }
if err := ebiten.Run(g.Update, screenWidth, screenHeight, 1, "Flappy Gopher (Ebiten Demo)"); err != nil { if err := ebiten.Run(g.Update, screenWidth, screenHeight, 1, "Flappy Gopher (Ebiten Demo)"); err != nil {