Fixed bug where menu song wasn't repeated.

This commit is contained in:
Sander Schobers 2021-08-19 21:37:29 +02:00
parent 65db973699
commit 5935a7fea8

View File

@ -13,6 +13,7 @@ type appContext struct {
Settings *tins2021.Settings Settings *tins2021.Settings
Score *tins2021.ScoreState Score *tins2021.ScoreState
Virtual *VirtualControls
Debug bool Debug bool
StarTexture tins2021.AnimatedTexture StarTexture tins2021.AnimatedTexture
@ -192,7 +193,7 @@ func (app *appContext) switchToMenuMusic(ctx ui.Context) {
if app.MenuMusic != nil { if app.MenuMusic != nil {
return return
} }
app.MenuMusic, _ = app.Audio.PlayMusic("song_menu.mp3", func(m *Music) {}) app.MenuMusic, _ = app.Audio.PlayMusic("song_menu.mp3", func(m *Music) { m.AutoRepeat = true })
gameMusic := app.GameMusic gameMusic := app.GameMusic
app.GameMusic = nil app.GameMusic = nil
if gameMusic != nil { if gameMusic != nil {