examples/audioinfiniteloop: Use filepath (#428)

This commit is contained in:
Hajime Hoshi 2017-09-07 11:44:14 +09:00
parent 4b98fb248f
commit 849211a5b0

View File

@ -19,6 +19,7 @@ package main
import ( import (
"fmt" "fmt"
"log" "log"
"path/filepath"
"github.com/hajimehoshi/ebiten" "github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/audio" "github.com/hajimehoshi/ebiten/audio"
@ -46,7 +47,7 @@ var player *audio.Player
func update(screen *ebiten.Image) error { func update(screen *ebiten.Image) error {
if player == nil { if player == nil {
wavF, err := ebitenutil.OpenFile("_resources/audio/jab.wav") wavF, err := ebitenutil.OpenFile(filepath.Join("_resources", "audio", "jab.wav"))
if err != nil { if err != nil {
return err return err
} }