mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 20:18:59 +01:00
examples/flappy: Should use fullscreen on Wasm
This commit is contained in:
parent
56541a8c0a
commit
13174cdb22
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user